111.111.111.11
root
1111
Jdk
Nginx
fastdfs
一jdk
<1>.
openjdk
# rpm -qa |grep java # rpm -qa |grep jdk # rpm -qa |grep gcj
# yum list java-1.8*
# yum install java-1.8.0-openjdk* -y
mysql
<1>.
># wget http://dev.mysql.com/get/mysql57-community-release-el 7-8.noarch.rpm
># yum localinstall mysql57-community-release-el7-8.noarch.rpm
># yum repolist enabled | grep "mysql.*-community.*"
># yum install mysql-community-server(一路按y)
># systemctl start mysqld
停止
># systemctl stop mysqld
># systemctl status mysqld
<7>
># systemctl enable mysqld ># systemctl daemon-reload
(
># grep 'temporary password' /var/log/mysqld.log
# 2017-05-23T04:53:37.967825Z 1 [Note] A temporary password is generated for root@localhost: wztxYpby+2Gr
<9>,,)
mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY 'ShangLi@2017';
mysql> alter user user() identified by "Dg19921123.";
mysql> GRANT ALL PRIVILEGES ON *.* TO '用户名'@'%' IDENTIFIED BY '密码' WITH GRANT OPTION;
nginx
<1>
# yum -y install gcc zlib zlib-devel pcre-devel openssl openssl-devel
<2>
# cd /usr/local
# wget http://nginx.org/download/nginx-1.8.1.tar.gz) # yum install lrzsz -y # rz
# tar -zxvf nginx-1.8.1.tar.gz
<3>
# mv nginx-1.13.7.tar.gz nginx
# cd nginx
# ./configure \ > --prefix=/usr/local/nginx \ > --pid-path=/var/run/nginx/nginx.pid \ > --lock-path=/var/lock/nginx.lock \ > --error-log-path=/var/log/nginx/error.log \ > --http-log-path=/var/log/nginx/access.log \ > --with-http_gzip_static_module \ > --http-client-body-temp-path=/var/temp/nginx/client \ > --http-proxy-temp-path=/var/temp/nginx/proxy \ > --http-fastcgi-temp-path=/var/temp/nginx/fastcgi \ > --http-uwsgi-temp-path=/var/temp/nginx/uwsgi \ > --http-scgi-temp-path=/var/temp/nginx/scgi \ > --add-module=/usr/local/fastdfs-nginx-module/src
# make
# make install
nginx.conf
# cd conf # vim nginx.conf (修改server{ listen 80; #端口 server_name localhost;#本机ip(或域名) location /group1/M00/{ ngx_fastdfs_module; } })
nginx
# cd /usr/local/nginx/sbin # ./nginx -s reload
# ps -ef|grep nginx
nginx
# ./nginx -s stop
fastdfs
<1>
# yum -y install gcc-c++
<2>
# yum -y install libevent
<3>
# cd /usr/local
# rz
# tar -zxvf libfastcommonV1.0.7.tar.gz
# cd libfastcommonV1.0.7
# ./make.sh
# ./make.sh install
# cp /usr/lib64/libfastcommon.so /usr/lib
<4>
# cd /usr/local
# tar -zxvf FastDFS_v5.05.tar.gz
# cd FastDFS
# ./make.sh
# ./make.sh install
# cd conf # cp * /etc/fdfs/
# cd /etc/fdfs # vim tracker.conf
22122)
# mkdir /home/fastdfs
tracker
# /usr/bin/fdfs_trackerd /etc/fdfs/tracker.conf restart
# ps -ef|grep fdfs
<5>
()
<6>
# cd /etc/fdfs # vim storage.conf
111.111.111.11
# mkdir /home/fastdfs/fdfs_storage
storage
# /usr/bin/fdfs_storaged /etc/fdfs/storage.conf restart
# ps -ef|grep fdfs
fastdfsnginx
<1>
# cd /usr/local
fastdfs-nginx-module_v1.16.tar.gz
# tar -zxvf fastdfs-nginx-module_v1.16.tar.gz
# cd fastdfs-nginx-module/src # vim config (修改 CORE_INCS"$CORE_INCS/usr/include/fastdfs/usr/include/fastcommon/" CORE_LIBS="$CORE_LIBS -L/usr/lib -lfastcommon -lfdfsclient" )
# cp mod_fastdfs.conf /etc/fdfs/
mod_fastdfs.conf
# vim /etc/fdfs/mod_fastdfs.conf (修改base_path=/home/fastdfs,为tracker中配置的路径 tracker_server=111.111.111.11:22122 url_have_group_name=true store_path0=/home/fastdfs/fdfs_storage,为storage中配置的路径)
# cp /usr/lib64/libfdfsclient.so /usr/lib
# mkdir -p /var/temp/nginx/client
<1>
# ps -ef|grep nginx # ps -ef|grep fdfs
<2>
# /usr/bin/fdfs_test /etc/fdfs/client.conf upload /usr/local/1.png (/usr/local/1.png为服务器上的图片)
group1/M00/00/00/rBAADF0DP9mAVeEQAAIu_PoGmts651.png
http://111.111.111.11:80/group1/M00/00/00/rBAADF0DP9mAVeEQAAIu_Po