官网下载:
MySQL-server-5.5.31-2.linux2.6.x86_64.rpm
MySQL-client-5.5.31-2.linux2.6.x86_64.rpm
MySQL-devel-5.5.31-2.linux2.6.x86_64.rpm
rpm -ivh ...
3999 05/07/13 16:28:06 /usr/bin/mysqladmin -u root password 'xupo'
4000 05/07/13 16:28:30 /etc/init.d/mysql start
4001 05/07/13 16:28:37 ps -ef | grep mysql
4002 05/07/13 16:28:40 /usr/bin/mysqladmin -u root password 'xupo'
4004 05/07/13 16:29:07 mysql -u root -p
二,安装必要包
4013 05/07/13 16:54:36 yum install prce
4014 05/07/13 16:54:42 yum install pcre
4015 05/07/13 16:55:24 yum update pcre
4016 05/07/13 16:55:49 rpm -qa | pcre
4017 05/07/13 16:55:55 rpm -qa | grep pcre
4018 05/07/13 16:56:03 rpm -qa | grep pcre-devel
三,安装lighttpd
4006 05/07/13 16:44:31 wget http://download.lighttpd.net/lighttpd/releases-1.4.x/lighttpd-1.4.32.tar.gz
4007 05/07/13 16:45:00 ll
4008 05/07/13 16:45:31 tar -xf lighttpd-1.4.32.tar.gz
4009 05/07/13 16:45:34 cd lighttpd-1.4.32
4247 05/07/13 17:25:16 cp doc/initscripts/rc.lighttpd.redhat /etc/init.d/lighttpd
4248 05/07/13 17:25:24 chmod +x /etc/init.d/lighttpd
4249 05/07/13 17:25:56 cp -p doc/initscripts/sysconfig.lighttpd /etc/sysconfig/lighttpd
4250 05/07/13 17:26:07 mkdir -p /etc/lighttpd
4251 05/07/13 17:34:37 cp -rf doc/config/* /etc/lighttpd/
4252 05/07/13 17:34:45 chkconfig --add lighttpd
4253 05/07/13 17:34:52 chkconfig lighttpd on
4254 05/07/13 17:35:03 vim +29 /etc/init.d/lighttpd
4255 05/07/13 17:35:50 ll /usr/local/lighttpd/sbin/lighttpd
4256 05/07/13 17:35:52 vim +29 /etc/init.d/lighttpd
4257 05/07/13 17:36:08 df -h
4258 05/07/13 17:36:31 mkdir -p /data/reviewboard
4259 05/07/13 17:37:12 mkdir -p /data/reviewboard/log/lighttpd
4260 05/07/13 17:37:31 touch /data/reviewboard/log/lighttpd/access.log
4261 05/07/13 17:37:38 touch /data/reviewboard/log/lighttpd/error.log
4262 05/07/13 17:38:19 useradd -s /sbin/nologin lighttpd
4263 05/07/13 17:40:18 chown -R lighttpd:lighttpd /var/log/lighttpd/
4264 05/07/13 17:40:26 chown -R lighttpd:lighttpd /var/log/lighttpd/
4265 05/07/13 17:40:46 chown -R lighttpd:lighttpd /data/reviewboard/log/lighttpd/
4266 05/07/13 17:50:36 /etc/init.d/lighttpd start
4267 05/07/13 17:51:02 vim /etc/init.d/lighttpd
4268 05/07/13 17:51:32 vim /etc/sysconfig/lighttpd
4269 05/07/13 17:51:47 vim /etc/lighttpd/lighttpd.conf
4270 05/07/13 17:52:53 vim /etc/sysconfig/lighttpd
4271 05/07/13 17:52:58 /etc/init.d/lighttpd start
4272 05/07/13 17:53:11 mkdir /data/reviewboard/www/htdocs
4273 05/07/13 17:53:13 mkdir /data/reviewboard/www
4274 05/07/13 17:53:15 mkdir /data/reviewboard/www/htdocs
4275 05/07/13 17:53:19 /etc/init.d/lighttpd start
4276 05/07/13 17:53:31 vim /etc/lighttpd/lighttpd.conf
4277 05/07/13 17:53:41 /etc/init.d/lighttpd start
4278 05/07/13 17:53:56 vim /etc/lighttpd/lighttpd.conf
4279 05/07/13 17:54:15 /etc/init.d/lighttpd start
4280 05/07/13 17:54:25 netstat -anptl | grep 7001
4281 05/07/13 17:54:51 netstat -anptl | grep 7001
4282 05/07/13 17:56:09 cat > /data/reviewboard/www/htdocs/index.html
四,更新python包
以防reviewboard最新版依赖2.x以上python,首先更新系统python
#wget http://www.python.org/ftp/python/2.7.3/Python-2.7.3.tgz
#tar zxvf Python-2.7.3.tgz
#cd Python-2.7.3
#./configure --prefix=/usr/local/python273
#make && make install
正常情况下即使python2.7安装成功后,系统默认指向的python仍然是2.6.6版本,考虑到yum是基于python2.6.6才能正常工作,所以这里先备份老版本的/usr/bin/python文件为/usr/bin/python-old,然后再做个软连接到/usr/bin/就可以了。
mv /usr/bin/python /usr/bin/python-old
ln -s /usr/local/python273/bin/python /usr/bin/
python -V可以看到新版本python2.7.3已经生效了,
升级安装好以后你会发现yum无法使用了,因为yum使用的是2.6.6版本的python,所以要修改yum的配置文件以便能够识别2.6.6版本下的python
#vi /usr/bin/yum
#!/usr/bin/python --> #!/usr/bin/python-old #修改此处为2.6.6的位置,就可以继续使用yum了整个升级过程完成,可以使用Python2.7.3版本了。
五,更新easy_install,
如果不更新,在后续安装reviewboard会出现如下问题:
Traceback (most recent call last):
File "/usr/bin/easy_install", line 5, in
from pkg_resources import load_entry_point ImportError: No module named pkg_resources raid:/home/linyoujushi# easy_install genshi Traceback (most recent call last):
解决办法:
这是由于我们没有安装setuptools或者没有装好,我们只需要安装这个软件就行了。
安装方法:
先下载:
wget http://peak.telecommunity.com/dist/ez_setup.py
再安装
python ez_setup.py
或者,我们装的setuptools工具太老,我们升级一下:
sudo python ./ez_setup.py -U setuptools
六,安装reviewboard
$ yum install python-setuptools
$ easy_install -U setuptools
$ yum install memcached
$ easy_install python-memcached
$ easy_install ReviewBoard
$ easy_install mysql-python
$ yum install subversion
注意,如果在安装mysql-python出现,如下问题:
可以尝试手动安装:
wget http://pypi.python.org/packages/source/M/MySQL-python/MySQL-python-1.2.4.zip#md5=ddf2386daf10a97af115ffad2ed4a9a0
unzip MySQL-python-1.2.4.zip
cd MySQL-python-1.2.4
vim site.cfg
把static改成True
如果还说libmysqlclient_r.a找不到,
可以这样:
ln -s /usr/lib64/mysql/libmysqlclient_r.a /usr/lib64/libmysqlclient_r.a
python setup.py build
python setup.py install