ログインしていません。

アナウンス

連絡: このフォーラムは利用が少なく、主としてスパムの投稿が多いため、閉鎖いたしました。今後は閲覧のみ可能で、新しい投稿はできなくなります。Arch Linuxに関する日本語のコミュニケーションにはSlackコミュニティをご利用ください。

#1 初心者コーナー » XFCE環境でのLightdm自動ログインについて » 2020-10-26 15:55:16

hakutho
返信: 1

こんにちは。
自動ログインの方法

$ sudo -i
# groupadd -r autologin
# gpasswd -a usuha autologin
# nano /etc/lightdm/lightdm.conf
[Seat:*]
autologin-user=usuha
autologin-session=xfce

再起動

しかし、自動ログインできない。
どのような設定で自動ログインできますか?
よろしくお願いします。

#2 Re: 初心者コーナー » command not found: hostname » 2020-10-19 16:29:37

hakutho

inetutilsをインストールすることで解決しました。
/home/usuha/.zshrc:46: command not found: hostname
[usuha@arch:~]$ sudo pacman -Syu                                                               (10-19 13:01)

あなたはシステム管理者から通常の講習を受けたはずです。
これは通常、以下の3点に要約されます:

    #1) 他人のプライバシーを尊重すること。
    #2) タイプする前に考えること。
    #3) 大いなる力には大いなる責任が伴うこと。

[sudo] usuha のパスワード:
:: パッケージデータベースの同期中...
core は最新です
extra は最新です
community は最新です
multilib は最新です
:: システム全体の更新を開始...
何も行うことがありません
[usuha@arch:~]$ sudo pacman -Syu inetutils                                                     (10-19 13:02)
:: パッケージデータベースの同期中...
core は最新です
extra は最新です
community は最新です
multilib は最新です
:: システム全体の更新を開始...
依存関係を解決しています...
衝突するパッケージがないか確認しています...

パッケージ (1)  新しいバージョン  最終的な変化  ダウンロード容量

core/inetutils  1.9.4-8               1.11 MiB          0.29 MiB

合計ダウンロード容量:  0.29 MiB
合計インストール容量:  1.11 MiB

:: インストールを行いますか? [Y/n] y
:: パッケージを取得します...
inetutils-1.9.4-8-x86_64             295.7 KiB   510 KiB/s 00:01 [------------------------------------] 100%
(1/1) キーリングのキーを確認                                      [------------------------------------] 100%
(1/1) パッケージの整合性をチェック                                [------------------------------------] 100%
(1/1) パッケージファイルのロード                                  [------------------------------------] 100%
(1/1) ファイルの衝突をチェック                                    [------------------------------------] 100%
(1/1) 空き容量を確認                                              [------------------------------------] 100%
:: パッケージの変更を処理しています...
(1/1) インストール inetutils                                      [------------------------------------] 100%
:: トランザクション後のフックを実行...
(1/3) Reloading system manager configuration...
(2/3) Arming ConditionNeedsUpdate...
(3/3) Updating the info directory file...
[usuha@arch:~]$                                                                                (10-19 13:03)
ありがとうございました。

#3 初心者コーナー » command not found: hostname » 2020-10-17 19:20:21

hakutho
返信: 2

こんにちは。
Arch Linux Cinnamonを使っています。
Terminalを開いたときに「/home/usuha/.zshrc:46: command not found: hostname」と言うエラーメッセージが表示されます。
このエラーメッセージには、どのような意味があるのでしょうか。
解決する方法は、あるのでしょうか?
よろしくお願いします。

[usuha@arch:~]$ cat /home/usuha/.zshrc                                                         (10-17 19:35)
#######################################################
####### Anarchy ZSH configuration file    #######
#######################################################

### Set/unset ZSH options
#########################
# setopt NOHUP
# setopt NOTIFY
# setopt NO_FLOW_CONTROL
setopt INC_APPEND_HISTORY SHARE_HISTORY
setopt APPEND_HISTORY
# setopt AUTO_LIST
# setopt AUTO_REMOVE_SLASH
# setopt AUTO_RESUME
unsetopt BG_NICE
setopt CORRECT
setopt EXTENDED_HISTORY
# setopt HASH_CMDS
setopt MENUCOMPLETE
setopt ALL_EXPORT

### Set/unset  shell options
############################
setopt   notify globdots correct pushdtohome cdablevars autolist
setopt   correctall autocd recexact longlistjobs
setopt   autoresume histignoredups pushdsilent
setopt   autopushd pushdminus extendedglob rcquotes mailwarning
unsetopt bgnice autoparamslash

### Autoload zsh modules when they are referenced
#################################################
autoload -U history-search-end
zmodload -a zsh/stat stat
zmodload -a zsh/zpty zpty
zmodload -a zsh/zprof zprof
#zmodload -ap zsh/mapfile mapfile
zle -N history-beginning-search-backward-end history-search-end
zle -N history-beginning-search-forward-end history-search-end

### Set variables
#################
PATH="/usr/local/bin:/usr/local/sbin/:$PATH"
HISTFILE=$HOME/.zhistory
HISTSIZE=1000
SAVEHIST=1000
HOSTNAME="$(hostname)"
LS_COLORS='rs=0:di=01;34:ln=01;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:tw=30;42:ow=34;42:st=37;44:ex=01;32:';

### Load colors
###############
autoload colors zsh/terminfo
if [[ "$terminfo[colors]" -ge 8 ]]; then
   colors
fi
for color in RED GREEN YELLOW BLUE MAGENTA CYAN WHITE; do
   eval PR_$color='%{$terminfo[bold]$fg[${(L)color}]%}'
   eval PR_LIGHT_$color='%{$fg[${(L)color}]%}'
   (( count = $count + 1 ))
done

### Set Colors to use in in the script
#############
# Normal Colors
Black='\e[0;30m'        # Black
Red='\e[0;31m'          # Red
Green='\e[0;32m'        # Green
Yellow='\e[0;33m'       # Yellow
Blue='\e[0;34m'         # Blue
Purple='\e[0;35m'       # Purple
Cyan='\e[0;36m'         # Cyan
White='\e[0;37m'        # White

# Bold
BBlack='\e[1;30m'       # Black
BRed='\e[1;31m'         # Red
BGreen='\e[1;32m'       # Green
BYellow='\e[1;33m'      # Yellow
BBlue='\e[1;34m'        # Blue
BPurple='\e[1;35m'      # Purple
BCyan='\e[1;36m'        # Cyan
BWhite='\e[1;37m'       # White

# Background
On_Black='\e[40m'       # Black
On_Red='\e[41m'         # Red
On_Green='\e[42m'       # Green
On_Yellow='\e[43m'      # Yellow
On_Blue='\e[44m'        # Blue
On_Purple='\e[45m'      # Purple
On_Cyan='\e[46m'        # Cyan
On_White='\e[47m'       # White

NC="\e[m"               # Color Reset

### Set prompt
##############
PR_NO_COLOR="%{$terminfo[sgr0]%}"
PS1="[%(!.${PR_RED}%n.$PR_LIGHT_YELLOW%n)%(!.${PR_LIGHT_YELLOW}@.$PR_RED@)$PR_NO_COLOR%(!.${PR_LIGHT_RED}%U%m%u.${PR_LIGHT_GREEN}%U%m%u)$PR_NO_COLOR:%(!.${PR_RED}%2c.${PR_BLUE}%2c)$PR_NO_COLOR]%(?..[${PR_LIGHT_RED}%?$PR_NO_COLOR])%(!.${PR_LIGHT_RED}#.${PR_LIGHT_GREEN}$) "
RPS1="$PR_LIGHT_YELLOW(%D{%m-%d %H:%M})$PR_NO_COLOR"
unsetopt ALL_EXPORT

### set common functions
#############

function my_ip() # Get IP adress.
{
   curl ifconfig.co
}

# Find a file with a pattern in name:
function ff()
{
    find . -type f -iname '*'"$*"'*' -ls ;
}



function sysinfo()   # Get current host related info.
{
    echo -e "\n${BRed}System Informations:$NC " ; uname -a
    echo -e "\n${BRed}Online User:$NC " ; w -hs |
             cut -d " " -f1 | sort | uniq
    echo -e "\n${BRed}Date :$NC " ; date
    echo -e "\n${BRed}Server stats :$NC " ; uptime
    echo -e "\n${BRed}Memory stats :$NC " ; free
    echo -e "\n${BRed}Public IP Address :$NC " ; my_ip
    echo -e "\n${BRed}Open connections :$NC "; netstat -pan --inet;
    echo -e "\n${BRed}CPU info :$NC "; cat /proc/cpuinfo ;
    echo -e "\n"
}

function extract {
if [ -z "$1" ]; then
    # display usage if no parameters given
    echo "Usage: extract <path/file_name>.<zip|rar|bz2|gz|tar|tbz2|tgz|Z|7z|xz|ex|tar.bz2|tar.gz|tar.xz>"
else
    if [ -f $1 ] ; then
        # NAME=${1%.*}
        # mkdir $NAME && cd $NAME
        case $1 in
          *.tar.bz2)   tar xvjf ../$1    ;;
          *.tar.gz)    tar xvzf ../$1    ;;
          *.tar.xz)    tar xvJf ../$1    ;;
          *.lzma)      unlzma ../$1      ;;
          *.bz2)       bunzip2 ../$1     ;;
          *.rar)       unrar x -ad ../$1 ;;
          *.gz)        gunzip ../$1      ;;
          *.tar)       tar xvf ../$1     ;;
          *.tbz2)      tar xvjf ../$1    ;;
          *.tgz)       tar xvzf ../$1    ;;
          *.zip)       unzip ../$1       ;;
          *.Z)         uncompress ../$1  ;;
          *.7z)        7z x ../$1        ;;
          *.xz)        unxz ../$1        ;;
          *.exe)       cabextract ../$1  ;;
          *)           echo "extract: '$1' - unknown archive method" ;;
        esac
    else
        echo "$1 - file does not exist"
    fi
fi
}


# Creates an archive (*.tar.gz) from given directory.
function maketar() { tar cvzf "${1%%/}.tar.gz"  "${1%%/}/"; }

# Create a ZIP archive of a file or folder.
function makezip() { zip -r "${1%%/}.zip" "$1" ; }


function my_ps() { ps $@ -u $USER -o pid,%cpu,%mem,bsdtime,command ; }

mcd () {
    mkdir -p $1
    cd $1
}

### Set alias
#############
alias cls="clear"
alias ..="cd .."
alias cd..="cd .."
alias ll="ls -lisa --color=auto"
alias home="cd ~"
alias df="df -ahiT --total"
alias mkdir="mkdir -pv"
alias mkfile="touch"
alias rm="rm -rfi"
alias userlist="cut -d: -f1 /etc/passwd"
alias ls="ls -CF --color=auto"
alias lsl="ls -lhFA | less"
alias free="free -mt"
alias du="du -ach | sort -h"
alias ps="ps auxf"
alias psgrep="ps aux | grep -v grep | grep -i -e VSZ -e"
alias wget="wget -c"
alias histg="history | grep"
alias myip="curl http://ipecho.net/plain; echo"
alias logs="find /var/log -type f -exec file {} \; | grep 'text' | cut -d' ' -f1 | sed -e's/:$//g' | grep -v '[0-9]$' | xargs tail -f"
alias folders='find . -maxdepth 1 -type d -print0 | xargs -0 du -sk | sort -rn'
alias grep='grep --color=auto'


### Bind keys
#############
autoload -U compinit
compinit
bindkey "^?" backward-delete-char
bindkey '^[OH' beginning-of-line
bindkey '^[OF' end-of-line
bindkey '^[[5~' up-line-or-history
bindkey '^[[6~' down-line-or-history
bindkey "^[[A" history-beginning-search-backward-end
bindkey "^[[B" history-beginning-search-forward-end
bindkey "^r" history-incremental-search-backward
bindkey ' ' magic-space    # also do history expansion on space
bindkey '^I' complete-word # complete on tab, leave expansion to _expand
zstyle ':completion::complete:*' use-cache on
zstyle ':completion::complete:*' cache-path ~/.zsh/cache/$HOST

zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS}
zstyle ':completion:*' list-prompt '%SAt %p: Hit TAB for more, or the character to insert%s'
zstyle ':completion:*' menu select=1 _complete _ignored _approximate
zstyle -e ':completion:*:approximate:*' max-errors \
    'reply=( $(( ($#PREFIX+$#SUFFIX)/2 )) numeric )'
zstyle ':completion:*' select-prompt '%SScrolling active: current selection at %p%s'

# Completion Styles

# list of completers to use
zstyle ':completion:*::::' completer _expand _complete _ignored _approximate

# allow one error for every three characters typed in approximate completer
zstyle -e ':completion:*:approximate:*' max-errors \
    'reply=( $(( ($#PREFIX+$#SUFFIX)/2 )) numeric )'

# insert all expansions for expand completer
zstyle ':completion:*:expand:*' tag-order all-expansions

# formatting and messages
zstyle ':completion:*' verbose yes
zstyle ':completion:*:descriptions' format '%B%d%b'
zstyle ':completion:*:messages' format '%d'
zstyle ':completion:*:warnings' format 'No matches for: %d'
zstyle ':completion:*:corrections' format '%B%d (errors: %e)%b'
zstyle ':completion:*' group-name ''

# match uppercase from lowercase
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Z}'

# offer indexes before parameters in subscripts
zstyle ':completion:*:*:-subscript-:*' tag-order indexes parameters

# command for process lists, the local web server details and host completion
# on processes completion complete all user processes
zstyle ':completion:*:processes' command 'ps -au$USER'

## add colors to processes for kill completion
zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#)*=0=01;31'

#zstyle ':completion:*:processes' command 'ps -o pid,s,nice,stime,args'
#zstyle ':completion:*:urls' local 'www' '/var/www/htdocs' 'public_html'
#
#NEW completion:
# 1. All /etc/hosts hostnames are in autocomplete
# 2. If you have a comment in /etc/hosts like #%foobar.domain,
#    then foobar.domain will show up in autocomplete!
zstyle ':completion:*' hosts $(awk '/^[^#]/ {print $2 $3" "$4" "$5}' /etc/hosts | grep -v ip6- && grep "^#%" /etc/hosts | awk -F% '{print $2}')
# Filename suffixes to ignore during completion (except after rm command)
zstyle ':completion:*:*:(^rm):*:*files' ignored-patterns '*?.o' '*?.c~' \
    '*?.old' '*?.pro'
# the same for old style completion
#fignore=(.o .c~ .old .pro)

# ignore completion functions (until the _ignored completer)
zstyle ':completion:*:functions' ignored-patterns '_*'
zstyle ':completion:*:*:*:users' ignored-patterns \
        adm apache bin daemon games gdm halt ident junkbust lp mail mailnull \
        named news nfsnobody nobody nscd ntp operator pcap postgres radvd \
        rpc rpcuser rpm shutdown squid sshd sync uucp vcsa xfs avahi-autoipd\
        avahi backup messagebus beagleindex debian-tor dhcp dnsmasq fetchmail\
        firebird gnats haldaemon hplip irc klog list man cupsys postfix\
        proxy syslog www-data mldonkey sys snort
# SSH Completion
zstyle ':completion:*:scp:*' tag-order \
   files users 'hosts:-host hosts:-domain:domain hosts:-ipaddr"IP\ Address *'
zstyle ':completion:*:scp:*' group-order \
   files all-files users hosts-domain hosts-host hosts-ipaddr
zstyle ':completion:*:ssh:*' tag-order \
   users 'hosts:-host hosts:-domain:domain hosts:-ipaddr"IP\ Address *'
zstyle ':completion:*:ssh:*' group-order \
   hosts-domain hosts-host users hosts-ipaddr
zstyle '*' single-ignored show

### Source plugins
##################
source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
[usuha@arch:~]$                                                                                (10-17 19:36)

#4 Re: 初心者コーナー » 現在使用しているバージョンのセキュリティ更新がリリースされた場合にWordPressが自動更新できるようになります。 » 2020-09-11 18:18:15

hakutho

パーミッションの変更については、下記のようにしました。
[usuha@arch:~]$ cd /srv/http
[usuha@arch:/srv/http]$ ls -l
合計 25868
-rw-r--r--  1 root root       21  9月 11 17:15 info.php
-rw-r--r--  1 root root 13677083  9月  2 13:00 latest-ja.tar.gz
-rw-r--r--  1 root root 12795023  3月 21 13:31 phpMyAdmin-5.0.2-all-languages.tar.gz
drwxr-xr-x 13 http http     4096  9月 11 17:12 phpmyadmin/
drwxr-xr-x  5 http http     4096  9月 11 17:39 wordpress/
[usuha@arch:/srv/http]$ sudo chown root:root phpmyadmin/ -R
[sudo] usuha のパスワード:
[usuha@arch:/srv/http]$ ls -l
合計 25868
-rw-r--r--  1 root root       21  9月 11 17:15 info.php
-rw-r--r--  1 root root 13677083  9月  2 13:00 latest-ja.tar.gz
-rw-r--r--  1 root root 12795023  3月 21 13:31 phpMyAdmin-5.0.2-all-languages.tar.gz
drwxr-xr-x 13 root root     4096  9月 11 17:12 phpmyadmin/
drwxr-xr-x  5 http http     4096  9月 11 17:39 wordpress/
[usuha@arch:/srv/http]$ cd
[usuha@arch:~]$
この度は、色々とアドバイスをいただきまして、ありがとうございます。

#5 Re: 初心者コーナー » 現在使用しているバージョンのセキュリティ更新がリリースされた場合にWordPressが自動更新できるようになります。 » 2020-09-11 15:35:28

hakutho

こんにちは。
WordPress の DocumentRoot を /srv/http 変更して、WordPress をダウンロードして、再度インストールしましたら、WordPress の更新ができました。
ありがとうございました。
https://www.flickr.com/photos/185640693 … datetaken/

#6 Re: 初心者コーナー » 現在使用しているバージョンのセキュリティ更新がリリースされた場合にWordPressが自動更新できるようになります。 » 2020-09-11 10:52:38

hakutho

お返事をいただきまして、ありがとうございます。

Arch LinuxにLEMP(Percona Server)をインストールしています。
WordPressは、以下にようにインストールしました。

$ sudo pacman -S wordpress
$ ln -s /usr/share/webapps/wordpress/ /usr/share/nginx/html/

FTP userは、次のようになっています。
# useradd -d /usr/share/webapps/wordpress/ kaede
# passwd kaede
********

# chown kaede:kaede /usr/share/webapps/wordpress

$ echo "kaede" | sudo tee -a /etc/vsftpd.user_list

$ sudo nano /etc/vsftpd.conf

anonymous_enable=NO
local_enable=YES
write_enable=YES
local_umask=022
#anon_upload_enable=YES
#anon_mkdir_write_enable=YES
dirmessage_enable=YES
xferlog_enable=YES
connect_from_port_20=YES
xferlog_file=/var/log/vsftpd.log
xferlog_std_format=YES
nopriv_user=ichigo
ascii_upload_enable=YES
ascii_download_enable=YES
chroot_local_user=YES
chroot_list_enable=YES
chroot_list_file=/etc/vsftpd.chroot_list
listen=YES
listen_ipv6=YES
pam_service_name=vsftpd
secure_chroot_dir=/var/empty
userlist_enable=YES
userlist_file=/etc/vsftpd.user_list
rsa_cert_file=/etc/ssl/certs/vsftpd.pem
rsa_private_key_file=/etc/ssl/certs/vsftpd.pem
user_sub_token=ichigo
local_root=/srv/ftp/ichigo
user_sub_token=kaede
local_root=/usr/share/webapps/wordpress/
seccomp_sandbox=NO
allow_writeable_chroot=YES

$ usuha@ichigo:~$ sudo systemctl restart vsftpd

permissionは、こんな感じです。
[usuha@arch:~]$ cd /usr/share/webapps/
[usuha@arch:share/webapps]$ ls -l
合計 16
drwxr-xr-x  7 root root 4096  9月  6 04:28 drupal/
drwxr-xr-x  2 root root 4096  9月  6 04:28 php-apcu/
drwxr-xr-x 13 root http 4096  9月  5 23:34 phpMyAdmin/
drwxrwxr-x 14 root http 4096  9月  8 16:18 wordpress/
[usuha@arch:share/webapps]$

少しどこかが変でしょうか?

https://www.flickr.com/photos/185640693 … datetaken/

OpenSCADで、FTPサーバを構築するために、参考になるサイト等がありましたらご教授をお願いいたします。

#7 初心者コーナー » 現在使用しているバージョンのセキュリティ更新がリリースされた場合にWordPressが自動更新できるようになります。 » 2020-09-08 10:54:34

hakutho
返信: 8

こんにちは。
WordPress 5.5.1がリリースされましたが、バックグラウンドアップデートが期待どおりに機能していないようです。
一部のファイルはWordPressで書き込みできません。
xmlrpc.php
wp-blog-header.php
readme.html
wp-signup.php
index.php
wp-cron.php
wp-config-sample.php
wp-login.php
wp-settings.php
license.txt
wp-mail.php
wp-links-opml.php
wp-load.php
wp-includes/class-wp-user-query.php
wp-includes/l10n.php
wp-includes/date.php
wp-includes/class-wp-oembed.php
wp-includes/images/w-logo-blue-white-bg.png
wp-includes/images/blank.gif
wp-includes/images/down_arrow.gif

Arch Linuxで、FTP serverを構築することはできるのでしょうか?
よろしくお願いいたします。

Board footer

Powered by FluxBB