Marco education - Pharaoh Video - fourth week of work

▲ video to learn Pharaoh babies, see here (Section 7-8)
1, Find / var directory does not belong under the root, lp, all the files gdm
#find / var -not -user root -a -not - lp -user GDM -a -not the User -ls
#find / var -not (-user root lp -o -o -user -user GDM) -ls
2, each word in the file statistics /etc/init.d/functions number of occurrences, and ordering (grep and sed implemented with two methods)
#sed -R & lt 'S / [^ [: Alpha:]] + / \ n-/ G; / ^} / D' / etc / the init. D / Functions | Sed '/ ^ $ / D' | Sort | the uniq -C
#egrep -o "\ <[[: Alpha:]] * \>" /etc/init.d/functions | Sort | the uniq -C
The above command come to different statistics, ask the teacher to help sort out the command of ideas,

3, taken using the IPv4 address ifconfig command sed in the present machine
#ifconfig ens33 | '. 2S / sed -NR (. T ). NET * / \. 1 / P'
. 4, the configuration and the use of summary yum, yum including warehouse Creating
#mkdir / mnt
Mount / dev / SR0 / mnt
RPM -ivh the autofs - nodeps
systemctl Start the autofs
systemctl enable the autofs

#vim /etc/yum.repo/base.repo
#[Base]
name=base
baseurl=file:///misc/cd/
gpgcheck=0

[EPEL]
name = EPEL
baseurl = https://mirrors.aliyun.com/epel/$releasever/$basearch
gpgcheck = 0
5, writing system initialization script reset.sh, including aliases, prompt color, yum repository configuration file
# /data/bin/reset.sh Vim
PS1 = "[\ E [. 1; 35m] [\ @ U \ H \ W is] \ $ [\ E [0m]"
Sed -i / ^ = the SELINUX / cSELINUX = Disabled / etc / SELinux / config
systemctl disable firewalld
systemctl STOP firewalld
Alias cdnet = 'CD / etc / sysconfig / Network-scripts /'
. 6, the installation tree, ftp, lftp, telnet, etc. package
#yum the install lftp FTP Telnet -Y Tree
. 7, in CentOS7 on apache2.4 compile and install source package, and start this service
#rz --- import source package
# 1 yum groupinstall "Development Tools"
yum install apr-devel apr-util-devel-devel PCRE OpenSSL-devel
# 2 useradd - r -u 80 -d / data / www / -s / sbin / nologin httpd
The tar. 3 the httpd-XF # 2.4.25.tar.bz2
CD CD the httpd-2.4.25 /
#. 4 the README CAT
CAT the INSTALL
#. 5 ./configure --help
./configure --prefix = / App / --sysconfdir the httpd = / etc / httpd24 --enable --disable-Status-SSL
#. 6 the make the make the install &&
#. 7 the PATH variable
echo 'the PATH = / App / the httpd / bin: the PATH $'> /etc/profile.d/httpd.sh
. /etc/profile.d/httpd.sh
man to be compiled help file to import the correct path
/etc/man.config|man_db.conf
add a your MANPATH
# 8 apachectl Start

Guess you like

Origin blog.51cto.com/14350852/2430456