一、安装openssh-server
1、安装
yum install openssh-server -y
// 下载最新版本
2、重启
service sshd restart
3、开机自启
chkconfig sshd on
4、访问
ssh root@120.55.37.101
二、安装XAMPP集成运行环境(http://120.55.37.101/、http://10.80.102.38/)
1、下载
2、授予权限
chmod 777 xampp-linux-x64-5.6.14-0-installer.run
3、安装
./xampp-linux-x64-5.6.14-0-installer.run
4、启动XMAPP
/opt/lampp/lampp start
/opt/lampp/lampp restart
5、停止XMAPP
/opt/lampp/lampp stop
6、卸载XMAPP
rm -rf /opt/lampp
7、设置局域网访问
1)、xampp的配置文件:/opt/lampp/etc/extra/httpd-xampp.conf中将一下内容屏蔽
<LocationMatch “^/(?i (?:xampp|security|licenses|phpmyadmin|webalizer|server-status|server- info))”>
#Require local
ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
或者新增
Allow from all
Require all granted
2)、如果按照以上修改后,还是不能访问,则可能是防火墙把80端口给干掉了,要么把防火墙关闭,要么配置一下80端口允许访问
3)、开机自启 vi /etc/rc.d/rc.local
新增 /opt/lampp/lampp start
8、安装配置(设置密码)
/opt/lampp/lampp security
1)、设置xampp的密码:
XAMPP: Quick security check…
XAMPP: Your XAMPP pages are NOT secured by a password.
XAMPP: Do you want to set a password? [yes] yew
XAMPP: Do you want to set a password? [yes] yes
XAMPP: Password:
XAMPP: Password (again):
用户名默认是:xampp
2)、设置phpMyAdmin的密码:
XAMPP: The MySQL/phpMyAdmin user pma has no password set!!!
XAMPP: Do you want to set a password? [yes] yes
XAMPP: Password:
XAMPP: Password (again):
XAMPP: Setting new MySQL pma password.
XAMPP: Setting phpMyAdmin’s pma password to the new one.
3)、设置mysql的root账户:
XAMPP: MySQL has no root passwort set!!!
XAMPP: Do you want to set a password? [yes] yes
XAMPP: Write the password somewhere down to make sure you won’t forget it!!!
XAMPP: Password:
XAMPP: Password (again):
XAMPP: Setting new MySQL root password.
XAMPP: Change phpMyAdmin’s authentication method.
4)、设置ftp密码:
XAMPP: The FTP password for user ‘daemon’ is still set to ‘xampp’.
XAMPP: Do you want to change the password? [yes] yes
XAMPP: Password:
XAMPP: Password (again):
9、如果遇到MySQL远程访问失败
1)、查看端口3306是否开启远程监听! netstat -an | grep 3306
如果不输出任何信息,说名参数skip-networking起的作用是让 mysql 不再监听 TCP/IP 端口!此、
时,与mysqld的所有互动都必须通过Unix套接字或命名管道进行。需要将skip-networking注释掉,才
能明新使 mysql 监听3306端口!
# Don’t listen on a TCP/IP port at all. This can be a security enhancement,
# if all processes that need to connect to mysqld run on the same host.
# All interaction with mysqld must be made via Unix sockets or named pipes.
# Note that using this option without enabling named pipes on Windows
# (via the "enable-named-pipe" option) will render mysqld useless!
# skip-networking
2)、root用户是不允许远程访问的所以我们要创建一个可以远程访问的用户
mysql -u root -p
grant all privileges on . to iSailor
@”%” identified by “XXXX(登录密码)”;
三、安装rsync
1、检测是否有安装
rpm -qa|grep rsync
2、安装
yum install rsync
3、创建rsyncd服务的配置文件
mkeir /etc/rsyncd
四、将XAMPP中的Apache,MySQL,PHP连接到PATH
1、链接PHP到PATH
sudo ln -s /opt/lampp/bin/php /usr/bin/php
2、链接MySQL、Apache到PATH
export PATH=/opt/lampp/bin:$PATH
五、域名注册
1、实名认证(SailorHub)
2、域名解析(域名解析到某个IP地址服务器)
3、域名备案 (https://beian.aliyun.com/account/login.htm)
4、服务器备案(https://beian.aliyun.com/order/selfBaIndex.htm)
六、CentOS安装Jenkins
1、安装Java
sudo yum install java
2、添加第三方源
wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins.io/redhat-stable/jenkins.repo
rpm –import http://pkg.jenkins.io/redhat-stable/jenkins.io.key
3、安装Jenkins
yum install jenkins
4、启动Jenkins
sudo service jenkins start
4、停止Jenkins
sudo service jenkins stop
5、Jenkins相关配置
安装目录: /var/lib/jenkins/
配置文件目录: /etc/sysconfig/jenkins