w2周记1报道1总结 答辩 见习报告 合格才走
finalshell:ssh连接工具
Nginx
qq农场:
yum -y install nginx php php-fpm php-curl php-intl php-mcrypt php-mysql php-mbstring php-xml php-dom php-gd gd
wget https://dev.mysql.com/get/mysql80-community-release-el7-3.noarch.rpm
rpm -ivh mysql80-community-release-el7-3.noarch.rpm
vim /etc/yum.repos.d/mysql-community.repo enabled=1 21 enabled=0 28
yum -y install mysql mysql-server kill -9 26940
第三天QQ农场:
安装:
yum -y install nginx mariadb mariadb-server php php‐fpm php‐curl php‐intl php‐mcrypt php‐mysql php‐mbstring php‐xml php‐dom php‐gd gd
yum -y install php-fpm
启动服务:
systemctl start nginx mariadb php-fpm
systemctl enable nginx mariadb php-fpm
为数据库设置密码:
mysqladmin -uroot password "123"
mysql -uroot -p123
create database farm; 然后退出ctrl + c
nginx配置:
mv /etc/nginx/nginx.conf /etc/nginx/nginx.conf.bak
mv /etc/nginx/nginx.conf.default /etc/nginx/nginx.conf
vim /etc/nginx/nginx.conf
43
68 (不是qqfarm 是/webroot/farm)
vim /etc/php.ini
/short n 211 Off On
systemctl restart nginx php-fpm mariadb
上传,解压文件: root 后面 网站存放的位置
yum -y install lrzsz rz 解压
mkdir ‐p /webroot/farm
unzip farm‐ucenter1.5.zip
cp ‐rf upload/* /webroot/farm
chown ‐R apache.apache /webroot/farm
yum -y install php-mysql
systemctl restart nginx mariadb php-fpm
-------------------------------------------------------------------
UCenter的访问网址:
http://47.100.214.149/ucenter
UCenter 创始人密码:123
DISCUZ!的访问网址:
http://47.100.214.149/bbs
管理员访问网址:
http://47.100.214.149/bbs/admincp.php
管理员帐号:admin 管理员密码:123
UCenter Home的访问网址:
http://47.100.214.149/home
管理员访问网址:
http://47.100.214.149/home/admincp.php
管理员帐号:admin 管理员密码:123
-------------------------------------------------------------------
第五天:
1个服务器部署2个网站
yum -y install httpd mariadb mariadb-server php php-fpm php-gd gd php-mysql
systemctl start mariadb httpd
systemctl enable mariadb httpd
mysqladmin -uroot password "123"
mysql -uroot -p123
create database wordpress;
create database discuz;
vim /etc/httpd/conf.d/wordpress.conf
wordpress
discuz
全局修改: :% s/wordpress/discuz/g
vim /etc/httpd/conf/httpd.conf
43
镜像 :压缩包
yum -y install yum-utils device-mapper-persistent-data lvm2
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
yum -y install docker-ce
systemctl start docker
docker pull nginx
docker rmi docker.io/nginx:latest --force
docker run -i -t nginx /nin/bash
基础docker部署wordpress:
vim Dockerfile
FROM daocloud.io/centos:7 MAINTAINER "you" <zhuangyao@1000phone.com> ENV container docker RUN yum -y swap -- remove fakesystemd -- install systemd systemd-libs RUN yum -y update; yum clean all; (cd /lib/systemd/system/sysinit.target.wants/; for i in *; do [ $i == systemd-tmpfilessetup.service ] || rm -f $i; done); rm -f /lib/systemd/system/multi-user.target.wants/*; rm -f /etc/systemd/system/*.wants/*; rm -f /lib/systemd/system/local-fs.target.wants/*; rm -f /lib/systemd/system/sockets.target.wants/*udev*; rm -f /lib/systemd/system/sockets.target.wants/*initctl*; rm -f /lib/systemd/system/basic.target.wants/*; rm -f /lib/systemd/system/anaconda.target.wants/*; VOLUME [ "/sys/fs/cgroup" ] CMD ["/usr/sbin/init"]
docker build --rm -t local/c7-systemd .
docker run -it --privileged --name newrain -p 80:80 -p 3306:3306 -p
9000:9000 -v /opt:/opt -d local/c7-systemd:latest
docker exec -it newrain /bin/bash
rm -rf /etc/yum.repos.d/*
curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
yum clean all
yum makecache
yum -y install wget
wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
yum -y install php php-fpm php-gd php-mysql gd
mariadb mariadb-server httpd
systemctl start mariadb httpd php-fpm
systemctl enable mariadb httpd php-fpm
mysqladmin -u root password '123'
mysql -u root -p123
create database wordpress;
下载解压wordpress
cp -r wordpress/* /var/www/html/
chown -R apache.apache /var/www/html/
虚拟机:
最后一个改成yes
m加# b删除