Lokvin Wiki

linunx version[]

CentOS release 6.7 (64)

add user[]

[root@AY13111514211915241fZ /]# useradd -m appdev
[root@AY13111514211915241fZ /]# passwd appdev

add sudo previlege[]

shell> su 
shell> chmod +w /etc/sudoers
shell> echo '${username} ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
shell> chmod -w /etc/sudoers
shell> exit

set screen config[]

  • specify screen config on file ~/.screenrc
#set this up for convenience
defscrollback 8000
hardstatus alwayslastline "%Lw"
hardstatus string '%{= kG}[ %{G}%H %{g}][%= %{= kw}%?%-Lw%?%{r}(%{W}%n*%f%t%?(%u)%?%{r})%{w}%?%+Lw%?%?%= %{g}][%{B} %d/%m %{W}%c %{g}]'

stop default apache[]

[root@cory ~]# whereis apachectl
apachectl: /usr/sbin/apachectl /usr/share/man/man8/apachectl.8.gz
[root@cory ~]# /usr/sbin/apachectl stop

install git[]

shell>sudo yum install git

install subversion[]

shell>sudo yum install subversion

install nodejs[]

$ cd Downloads/
$ wget https://nodejs.org/dist/v4.3.1/node-v4.3.1-linux-x64.tar.xz .
$ tar Jxvf node-v4.3.1-linux-x64.tar.xz
cd /usr/local/
sudo mv ~/Downloads/node-v4.3.1-linux-x64 node-v4.3.1
sudo chown -R root:root node-v4.3.1
sudo ln -s node-v4.3.1 nodejs
cd /usr/local/bin/
sudo ln -s /usr/local/nodejs/bin/node node
sudo ln -s /usr/local/nodejs/bin/npm npm

add sudo $PATH[]

>sudo visudo
>Defaults    secure_path =+ /usr/local/bin

install nvm[]

install ghost blog[]

$ curl -L https://ghost.org/zip/ghost-latest.zip -o ghost.zip
$ unzip -uo ghost.zip -d ghost
$ cd /path/to/ghost
npm install --production
$ npm start
  • You can adjust the IP-address and port in config.js
  • Use forever run ghost in background
通过 npm install forever -g 安装 forever
NODE_ENV=production forever start index.js
通过 forever stop index.js 停止 Ghost
通过 forever list 检查 Ghost 当前是否正在运行

install jamwiki[]

install archiva[]

install gcc[]

>sudo yum install gcc

install apache and php[]

>wget http://mirrors.gigenet.com/apache//httpd/httpd-2.2.31.tar.gz .
>wget http://php.net/distributions/php-5.6.18.tar.gz .


install memcached[]

shell>sudo yum install memcached
  • start memcached
shell>sudo /etc/init.d/memcached start
  • memcached config