Skip to content

Instantly share code, notes, and snippets.

第一步:安装 Apache2 + PHP 模块
$ sudo apt-get install apache2 libapache2-mod-php5 php5 php5-mysql
第二步:安装并配置Mysql
安装mysql
$ sudo apt-get install mysql-client-5.0 mysql-server-5.0
创建dotproject用户
@wangwy
wangwy / Ubuntu Install+Uninstall lamp
Created August 28, 2014 10:14
Ubuntu下lamp(PHP+Mysql+Apache)搭建+完全卸载卸载方法
搭建:
收集自:http://www.cloudfly.info/archives/36
安装apache2
sudo apt-get install apache2
安装完成,运行如下命令重启下:
sudo /etc/init.d/apache2 restart
在浏览器里输入http://localhost或者是http://127.0.0.1,如果看到了“It works!“,那就说明Apache就成功的安装了,Apache的默认安装,会在/var下建立一个名为www的目录,这个就是Web目录了,所有要能过浏览器访问的Web文件都要放到这个目录里。
@wangwy
wangwy / Install zentao
Created September 23, 2014 10:17
安装禅道
第一步:搭建lamp环境
参考:https://gist.github.com/wangwy/39cf380b697ed55699a7
第二步:创建apache虚拟机
编辑/etc/apache2/site-available/000-default.conf
sudo vim /etc/apache2/site-available/000-default.conf
添加 <VirtualHost *:1986>
ServerName localhost
DocumentRoot /home/krx/zentaopms/www
</VirtualHost>
第三步:mysql创建zentao用户
@wangwy
wangwy / gerrit安装及配置
Last active May 9, 2016 01:39
gerrit安装及配置
1.下载
wget http://gerrit-releases.storage.googleapis.com/gerrit-2.9-rc2.war
2.重命名
mv gerrit-2.9-rc2.war gerrit.war
3.
sudo adduser gerrit2 # 添加用户
sudo userdel gerrit2 # 删除用户
sudo su gerrit2
<VirtualHost *:80>
# The ServerName directive sets the request scheme, hostname and port that
# the server uses to identify itself. This is used when creating
# redirection URLs. In the context of virtual hosts, the ServerName
# specifies what hostname must appear in the request's Host: header to
# match this virtual host. For the default virtual host (this file) this
# value is not decisive as it is used as a last resort host regardless.
# However, you must set it for any further virtual host explicitly.
#ServerName www.example.com
第一步:生成密钥文件
$ ssh-keygen
(该命令会在用户主目录下创建.ssh目录,并在其中创建两个文件:
id_rsa: 私钥文件,要妥善保管不要泄漏
id_rsa.pub: 公钥文件,可以公开)
第二步:将公钥远程加入服务器的公钥认证列表中
$ ssh-copy-id -i .ssh/id_rsa.pub <user>@<server>
(如果用户的公钥直接在服务器上,直接将文件追加到authorized_keys文件中:
$cat user.pub >> ~anonymous/.ssh/authorized_keys)
第三步:禁止用户用密码方式登录