Legacy Notes网络和服务端配置的笔记

在云服务器上使用LAMP全过程:

第一步:传文件

windows上下载winscp,连接使用scp协议。注意:centos需要安装scp

yum install openssh-clients 即可。

Ubuntu上安装 sudo apt-get install openssh-server

第二步:安装apache等所有组件

 

yum install -y httpd php php-fpm mysql mysql-server php-mysql

如果需要httpd开机自启动:  chkconfig httpd on

需要mysqld开机自启动   chkconfig mysqld on

 

第三步:启动服务

service httpd start
service mysqld start
service php-fpm start

为了减少工作量,让这些服务开机自动启动

/sbin/chkconfig --levels 235 httpd on

/sbin/chkconfig --levels 235 mysqld on

 

注意mysql的说明:To start mysqld at boot time you have to copy

support-files/mysql.server to the right place for your system

 

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !

To do so, start the server, then issue the following commands:

 

/usr/bin/mysqladmin -u root password 'new-password'

/usr/bin/mysqladmin -u root -h VM_234_213_centos password 'new-password'

 

第四步:测试一个简单的php网页:

默认的apacheweb根目录是/var/www/html Conf文件位置在 /etc/httpd/conf

 

上传一个的简单的php文件测试。重启一下httpd

 

第五步:mysql的管理:

mysqladmin -u root password "XXXXXXXX"

XXXX是你的密码。

 

如果要使用mysql,命令:mysql -u root –p

输入密码即可使用

 

第六步:赋予web目录其他用户写的权限:

 

chmod -R 777 /var/www/html

 

 

使用winscpsecureCRT远程断开的问题、

 

Winscp 需要定时刷新。选项-》面板-》远程-。。。。。。。刷新远程面板时间间隔  设置为14秒。

 

secureCRT 右键选项卡。会话选项-》终端-》反空闲-》发送NOOP 每隔 14秒。

 

 

关于http.conf的一些配置。

修改文件根目录

#DocumentRoot "E:/WebDev/Apache2.2/htdocs"

DocumentRoot "E:\WebDev\work"

 

<Directory "E:\WebDev\work">

    Options Indexes

   

    Order deny,allow

    Allow from all

         DirectoryIndex homepage.php

         AllowOverride All

</Directory>

 

 

DirectoryIndex   可以是类似index.html, index.php,

作为默认网页。

 

<IfModule dir_module>

    DirectoryIndex index.html

</IfModule>对所有文件夹,都起作用

 

使用企业建站系统 来部署php源码的企业网站。

http://down.chinaz.com/class/209_1.htm

http://www.mycodes.net/49/6123.htm

我们这里使用的是PHPOK

https://www.phpok.com/20645.html

在windows PHP环境下,该“企业建站系统”需要curl GD库的支持。

在php.ini

中extension=php_curl.dll
  extension=php_gd2.dll
 
Win7系统下,PHP的环境变量需要加上,php目录下的libeay32.dll, ssleay32.dll, 还有php/ext目录下php_curl.dll
一起复制到C:/windows/SysWOW64目录下,重启apache即可。
 
安装过程中提示必须phpok数据库必须存在。
打开CMD,mysql –u root –p
输入密码后,show databases;查看数据库
没有phpok,create database phpok;
如果要删除,drop databse XXX ,如果要是使用 use XXX;
 
LAMP环境中,需要GD库
yum -y install php-gd
重启apache
 

 

 

使用Wireshark分析http协议

比如webserver ip为115.159.6.156

在显示过滤器中 输入 http and ip.addr==115.159.6.156

 

为了更清晰的看http 内容,右键,follow TCPstream

 

使用DigitalOcean

建立VPN:

控制台输入:

wget https://raw.githubusercontent.com/yongweisun/pptp_1key_install/master/ezpptp.sh

输入:

sh ezpptp.sh 

按提示用户名和密码。

 

安装SS

https://blog.roadofgrowth.com/archives/163

http://cnodejs.org/topic/56a6d3c67ec020ed4b96b357

安全登录

http://www.tuicool.com/articles/AraU3i

其他一些

http://bbs.9ria.com/thread-202433-1-1.html

http://bbs.qcloud.com/thread-11732-1-1.html

 

http://www.jb51.net/article/74747.htm

介绍android和PHP的

http://blog.csdn.net/Davidluo001/article/details/42527799

http://swerit.iteye.com/blog/1291829

 

康展云的LAMP镜像使用文档

http://wenku.baidu.com/link?url=Yq9SDgMzrRnizKypv9kttJEfhi06HmOZi-T5DmRuK2j_o-9P4tYx6Z_3_rhE0XxOO45N8B3A3vOxI68h_qdK021sGzYgkEmUZzKHOAeAQ6K

 

http://www.osyunwei.com/archives/8415.html

 

http://www.linuxidc.com/Linux/2014-07/104563.htm

http://www.laozuo.org/3298.html

http://jingyan.baidu.com/article/3d69c5518e82e3f0cf02d7ea.html

 

http://bbs.qcloud.com/thread-1316-1-1.html

 

一些前端设计

http://www.shejidaren.com/

模版和资源

posted on 2016-12-27 16:23  legion  阅读(235)  评论(0编辑  收藏  举报

导航