#用xftp传到/opt[root@cloud1 opt]# ls
apr-1.6.3.tar.gz apr-util-1.6.1.tar.gz
[root@cloud1 opt]# tar -xf apr-1.6.3.tar.gz [root@cloud1 opt]# tar -xf apr-util-1.6.1.tar.gz[root@cloud1 opt]# cd apr-1.6.3/[root@cloud1 apr-1.6.3]# vim configure
30976 #$RM "$cfgfile" #在30976行添加注释[root@cloud1 apr-1.6.3]# ./configure --prefix=/usr/local/apr[root@cloud1 apr-1.6.3]# make && make install[root@cloud1 apr-1.6.3]# cd /opt/apr-util-1.6.1/[root@cloud1 apr-util-1.6.1]# ./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr[root@cloud1 apr-util-1.6.1]# make & make install
[root@z1 httpd-2.4.46]# apachectl start
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using fe80::20c:29ff:fec4:1136. Set the 'ServerName' directive globally to suppress this message
[root@cloud1 ~]# tar xf mysql-5.7.33-linux-glibc2.12-x86_64.tar.gz -C /usr/local/[root@cloud1 ~]# cd /usr/local/[root@cloud1 local]# ls
bin etc games include lib lib64 libexec mysql-5.7.33-linux-glibc2.12-x86_64 sbin share src
[root@cloud1 local]# mv mysql-5.7.33-linux-glibc2.12-x86_64/ mysql
修改权限
[root@cloud1 local]# chown -R mysql.mysql mysql/[root@cloud1 local]# ll | grep mysql
drwxr-xr-x 9 mysql mysql 129 May 2 03:05 mysql
[root@cloud1 local]# /usr/local/mysql/bin/mysqld --initialize --user=mysql --datadir=/opt/data/
2021-05-02T07:25:16.580540Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation formore details).
2021-05-02T07:25:16.781000Z 0 [Warning] InnoDB: New log files created, LSN=45790
2021-05-02T07:25:16.803557Z 0 [Warning] InnoDB: Creating foreign key constraint system tables.
2021-05-02T07:25:16.870950Z 0 [Warning] No existing UUID has been found, so we assume that this is the first time that this server has been started. Generating a new UUID: 8af2fb35-ab17-11eb-ae11-000c29c41136.
2021-05-02T07:25:16.872109Z 0 [Warning] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.
2021-05-02T07:25:17.191958Z 0 [Warning] CA certificate ca.pem is self signed.
2021-05-02T07:25:17.322977Z 1 [Note] A temporary password is generated for root@zl: sATlUgnra0-l
#把最后一行代码存放在一个文件里 留着备用[root@cloud1 local]# echo "sATlUgnra0-l" > ~/mysql_passwd[root@cloud1 local]# cat ~/mysql_passwd
sATlUgnra0-l
生成配置文件
[root@cloud1 ~]# vim /etc/my.cnf [mysqld]
basedir = /usr/local/mysql #指定mysql的安装目录
datadir = /opt/data #指定数据的存放目录
socket = /tmp/mysql.sock #指定套接字存放目录
port = 3306 #指定端口
pid-file = /opt/data/mysql.pid #指定pid文件存放位置
user = mysql #指定MySQL以什么用户的身份提供服务
skip-name-resolve
[root@cloud1 local]# cp -a /usr/local/mysql/support-files/mysql.server /etc/init.d/mysqld [root@cloud1 local]# vim /etc/init.d/mysqld
basedir=/usr/local/mysql #环境变量目录
datadir=/opt/data #数据存储目录[root@cloud1 local]# service mysqld start[root@cloud1 local]# chkconfig mysqld on[root@cloud1 local]# chkconfig --list
Note: This output shows SysV services only and does not include native
systemd services. SysV configuration data might be overridden by native
systemd configuration.
If you want to list systemd services use 'systemctl list-unit-files'.
To see services enabled on particular target use
'systemctl list-dependencies [target]'.
gcc-toolset-10-stap-server 0:off 1:off 2:off 3:off 4:off 5:off 6:off
gcc-toolset-10-systemtap 0:off 1:off 2:on 3:on 4:on 5:on 6:off
gcc-toolset-9-stap-server 0:off 1:off 2:off 3:off 4:off 5:off 6:off
gcc-toolset-9-systemtap 0:off 1:off 2:on 3:on 4:on 5:on 6:off
mysqld 0:off 1:off 2:on 3:on 4:on 5:on 6:off
修改密码
//修改密码
//使用临时密码登录
[root@z2 ~]# yum install -y ncurses-compat-libs[root@zl ~]# /usr/local/mysql/bin/mysql -uroot -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.7.22
Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h'for help. Type '\c' to clear the current input statement.
mysql>
//设置新密码
mysql>set password = password('123.com.');
Query OK, 0 rows affected, 1 warning (0.00 sec)
修改mysql登陆方式
[root@cloud1 ~]# vim ~/.my.cnf[client]
user=root
password=123.com
[root@cloud1 ~]# mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 6
Server version: 5.7.33 MySQL Community Server (GPL)
Copyright (c) 2000, 2021, Oracle and/or its affiliates.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h'for help. Type '\c' to clear the current input statement.
mysql>
C3安装php
安装php
[root@z3 ~]# yum install -y php* #centos8可安装php
启动php
[root@z3 ~]# systemctl start php-fpm.service
[root@z3 ~]# ss -antl
State Recv-Q Send-Q Local Address:Port Peer Address:Port Process
LISTEN 0 128 0.0.0.0:111 0.0.0.0:*
LISTEN 0 32 192.168.122.1:53 0.0.0.0:*
LISTEN 0 128 0.0.0.0:22 0.0.0.0:*
LISTEN 0 5 127.0.0.1:631 0.0.0.0:*
LISTEN 0 128 [::]:111 [::]:*
LISTEN 0 128 [::]:22 [::]:*
LISTEN 0 5 [::1]:631 [::]:*
[root@z3 ~]# ps -aux | grep php
root 3818 0.1 2.8 549564 37932 ? Ss 05:59 0:00 php-fpm: master process (/etc/php-fpm.conf)
apache 3819 0.0 1.6 565900 21704 ? S 05:59 0:00 php-fpm: pool www
apache 3820 0.0 1.6 565900 21708 ? S 05:59 0:00 php-fpm: pool www
apache 3821 0.0 1.6 565900 21708 ? S 05:59 0:00 php-fpm: pool www
apache 3822 0.0 1.6 565900 21708 ? S 05:59 0:00 php-fpm: pool www
apache 3823 0.0 1.6 565900 21708 ? S 05:59 0:00 php-fpm: pool www
root 3830 0.0 0.0 12112 1040 pts/1 S+ 05:59 0:00 grep --color=auto php
#有php的进程但是没有php的端口
#用xftp传到/opt[root@cloud1 opt]# ls
apr-1.6.3.tar.gz apr-util-1.6.1.tar.gz
[root@cloud1 opt]# tar -xf apr-1.6.3.tar.gz [root@cloud1 opt]# tar -xf apr-util-1.6.1.tar.gz[root@cloud1 opt]# cd apr-1.6.3/[root@cloud1 apr-1.6.3]# vim configure
30976 #$RM "$cfgfile" #在30976行添加注释[root@cloud1 apr-1.6.3]# ./configure --prefix=/usr/local/apr[root@cloud1 apr-1.6.3]# make && make install[root@cloud1 apr-1.6.3]# cd /opt/apr-util-1.6.1/[root@cloud1 apr-util-1.6.1]# ./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr[root@cloud1 apr-util-1.6.1]# make & make install
[root@z1 httpd-2.4.46]# apachectl start
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using fe80::20c:29ff:fec4:1136. Set the 'ServerName' directive globally to suppress this message
[root@cloud1 ~]# tar xf mysql-5.7.33-linux-glibc2.12-x86_64.tar.gz -C /usr/local/[root@cloud1 ~]# cd /usr/local/[root@cloud1 local]# ls
bin etc games include lib lib64 libexec mysql-5.7.33-linux-glibc2.12-x86_64 sbin share src
[root@cloud1 local]# mv mysql-5.7.33-linux-glibc2.12-x86_64/ mysql
修改权限
[root@cloud1 local]# chown -R mysql.mysql mysql/[root@cloud1 local]# ll | grep mysql
drwxr-xr-x 9 mysql mysql 129 May 2 03:05 mysql
[root@cloud1 local]# /usr/local/mysql/bin/mysqld --initialize --user=mysql --datadir=/opt/data/
2021-05-02T07:25:16.580540Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation formore details).
2021-05-02T07:25:16.781000Z 0 [Warning] InnoDB: New log files created, LSN=45790
2021-05-02T07:25:16.803557Z 0 [Warning] InnoDB: Creating foreign key constraint system tables.
2021-05-02T07:25:16.870950Z 0 [Warning] No existing UUID has been found, so we assume that this is the first time that this server has been started. Generating a new UUID: 8af2fb35-ab17-11eb-ae11-000c29c41136.
2021-05-02T07:25:16.872109Z 0 [Warning] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.
2021-05-02T07:25:17.191958Z 0 [Warning] CA certificate ca.pem is self signed.
2021-05-02T07:25:17.322977Z 1 [Note] A temporary password is generated for root@zl: sATlUgnra0-l
#把最后一行代码存放在一个文件里 留着备用[root@cloud1 local]# echo "sATlUgnra0-l" > ~/mysql_passwd[root@cloud1 local]# cat ~/mysql_passwd
sATlUgnra0-l
生成配置文件
[root@cloud1 ~]# vim /etc/my.cnf [mysqld]
basedir = /usr/local/mysql #指定mysql的安装目录
datadir = /opt/data #指定数据的存放目录
socket = /tmp/mysql.sock #指定套接字存放目录
port = 3306 #指定端口
pid-file = /opt/data/mysql.pid #指定pid文件存放位置
user = mysql #指定MySQL以什么用户的身份提供服务
skip-name-resolve
[root@cloud1 local]# cp -a /usr/local/mysql/support-files/mysql.server /etc/init.d/mysqld [root@cloud1 local]# vim /etc/init.d/mysqld
basedir=/usr/local/mysql #环境变量目录
datadir=/opt/data #数据存储目录[root@cloud1 local]# service mysqld start[root@cloud1 local]# chkconfig mysqld on[root@cloud1 local]# chkconfig --list
Note: This output shows SysV services only and does not include native
systemd services. SysV configuration data might be overridden by native
systemd configuration.
If you want to list systemd services use 'systemctl list-unit-files'.
To see services enabled on particular target use
'systemctl list-dependencies [target]'.
gcc-toolset-10-stap-server 0:off 1:off 2:off 3:off 4:off 5:off 6:off
gcc-toolset-10-systemtap 0:off 1:off 2:on 3:on 4:on 5:on 6:off
gcc-toolset-9-stap-server 0:off 1:off 2:off 3:off 4:off 5:off 6:off
gcc-toolset-9-systemtap 0:off 1:off 2:on 3:on 4:on 5:on 6:off
mysqld 0:off 1:off 2:on 3:on 4:on 5:on 6:off
修改密码
//修改密码
//使用临时密码登录
[root@z2 ~]# yum install -y ncurses-compat-libs[root@zl ~]# /usr/local/mysql/bin/mysql -uroot -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.7.22
Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h'for help. Type '\c' to clear the current input statement.
mysql>
//设置新密码
mysql>set password = password('123.com.');
Query OK, 0 rows affected, 1 warning (0.00 sec)
修改mysql登陆方式
[root@cloud1 ~]# vim ~/.my.cnf[client]
user=root
password=123.com
[root@cloud1 ~]# mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 6
Server version: 5.7.33 MySQL Community Server (GPL)
Copyright (c) 2000, 2021, Oracle and/or its affiliates.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h'for help. Type '\c' to clear the current input statement.
mysql>
C3安装php
安装php
[root@z3 ~]# yum install -y php* #centos8可安装php
启动php
[root@z3 ~]# systemctl start php-fpm.service
[root@z3 ~]# ss -antl
State Recv-Q Send-Q Local Address:Port Peer Address:Port Process
LISTEN 0 128 0.0.0.0:111 0.0.0.0:*
LISTEN 0 32 192.168.122.1:53 0.0.0.0:*
LISTEN 0 128 0.0.0.0:22 0.0.0.0:*
LISTEN 0 5 127.0.0.1:631 0.0.0.0:*
LISTEN 0 128 [::]:111 [::]:*
LISTEN 0 128 [::]:22 [::]:*
LISTEN 0 5 [::1]:631 [::]:*
[root@z3 ~]# ps -aux | grep php
root 3818 0.1 2.8 549564 37932 ? Ss 05:59 0:00 php-fpm: master process (/etc/php-fpm.conf)
apache 3819 0.0 1.6 565900 21704 ? S 05:59 0:00 php-fpm: pool www
apache 3820 0.0 1.6 565900 21708 ? S 05:59 0:00 php-fpm: pool www
apache 3821 0.0 1.6 565900 21708 ? S 05:59 0:00 php-fpm: pool www
apache 3822 0.0 1.6 565900 21708 ? S 05:59 0:00 php-fpm: pool www
apache 3823 0.0 1.6 565900 21708 ? S 05:59 0:00 php-fpm: pool www
root 3830 0.0 0.0 12112 1040 pts/1 S+ 05:59 0:00 grep --color=auto php
#有php的进程但是没有php的端口