首先到gforge官方下载安装源码。链接为http://gforgegroup.com/es/download.php。下载得install-gforge-as-561-src.zip安装包,这是高级版,另外有install-gforge-ce-561-src.zip社区版。安装方法差不多。
解压
# unzip install-gforge-as-561-src.zip
# cd gforge-as-561-src
# more INSTALL 查看安装说明。
# yum install php
# php install-gforge-1-deps.php CENTOS5(可支持以下的操作系统:[FC4|FC5|RHEL4|RHEL5|DEBIANETCH|UBUNTU6|UBUNTU7|UBUNTU9|CENTOS43|CENTOS5])
-=# Welcome to GForge Pre-Installer v5.0 #=-
Do you want to perform an (I)nitial installation or an (U)pgrade of
the system [I/u]?
提示选择安装还是升级程序,输入 I
系统自动安装软件,Php相关、apache、postgresql等。
完成后提示输入postgresql数据库名:
Database Name gforge5
Database Username gforge
Database Password
然后可以看到系统信息:
* Creating 'gforge' Group...
* Creating 'gforge' User...
* Creating Database User 'gforge'...
* Dumping GForge FTI DB
WARNING: changing return type of function
update_vectors from "opaque" to "trigger"
* Enter the Admin Username (gforgeadmin):gforgeadmin //gforge系统管理员用户名
* Enter the Site Admin Password: //gforge系统管理员密码
Enter the Apache group (apache): apache //apache 用户组
Enter the Apache username
(apache):apache
//apache 用户
Enter the Hostname for GForge (example: gforge5.company.com):
192.168.0.4 //gforge服务器域名
Enter the Name for your GForge Install (example: MyGForge):MyGForge //gforge名称
Be sure to read README.PERFORMANCE !
Done.
GForge5 has been successfully installed and configured.
然后查看README.PERFORMANCE文件
#cat README.PERFORMANCE
==============================================
The ioncube-encoded version of GForge AS can be sped up
significantly
by pre-loading the ioncube loaders. This can increase performance
by
up to 50-75% and is noticeable on slower or busy servers. To do
this,
go to the ioncube directory in gforge5 like this:
cd /opt/gforge5/ioncube
And run the loader-helper script.
php ioncube-loader-helper.php
Type 1 to get the instructions for the line that you need to
be placed
into your php.ini. Place the line as directed and restart
apache.
/etc/init.d/httpd restart
Usually, adding a line like this to your php.ini will be
correct, but
verify using the script above:
zend_extension = /opt/gforge5/ioncube/ioncube_loader_lin_5.1.so
OTHER NOTES
-----------
Q: GForge AS Seems slow, what can I do?
A: GForge AS is written almost entirely in object-oriented
code and
requires a fairly decent CPU to rip through it quickly and
generate
pages.
1) If you are on a vmware server, make sure the CPU of the
base
server is not saturated. If there are too many interrupts
and/or
the CPU is saturated, it will take longer to serve up the
complex
pages for GForge.
2) Use the installer to install gforge on a real machine and
be
sure to follow the README.PERFORMANCE document in the doc root.
Any
reasonably modern server should easily handle GForge when
it's
installed directly on the server instead of in a vmware
image.
3) Make sure enough memory is allocated to your system. If
you're
running vmware, make sure the guaranteed memory is at least
768MB
or some swapping can occur and that will really kill
performance.
4) If you're running an older vmware server product,
the
downloadable vmware image may not perform well in
compatibility
mode. You'll probably want to create a new vm on your server
with
centos5 and use the GForge installer.
===============================================
根据以上信息:
# cd /opt/gforge5/ioncube
# php ioncube-loader-helper.php
提示后选1 ,看到如下信息
==================
ionCube Loader Install Assistant
--------------------------------
Analysis of your system configuration shows:
+----------------------------------------------+
| PHP
Version
|
5.1.6
|
| Operating System |
Linux
|
| Threaded
PHP
|
No
|
| php.ini
file
|
/etc/php.ini
|
| Required Loader | ioncube_loader_lin_5.1.so
|
+----------------------------------------------+
To install the Loader in your php.ini file, edit or create the
file
/etc/php.ini
and add the following line before any other zend_extension lines:
zend_extension = //ioncube_loader_lin_5.1.so
where // is where you've installed the loader, e.g. /usr/local/ioncube/
If there are no zend_extension lines already, you can put
the
line at any point in the file.
Finally, stop and restart your web server software for the
changes to
take effect.
Installing the Loader for run-time loading
------------------------------------------
To install for runtime loading, create a directory called
ioncube
at or above the top level of your encoded files, and ensure that
the directory
contains the ioncube_loader_lin_5.1.so loader. If run-time install
of
the Loader is possible on your system then encoded files should
automatically
install the loader when
needed.
=======================================
由红色部分内容可知 php.ini 需要添加:
# vim /etc/php.ini
如果存在zend_extension ='……',在前面添加 zend_extension = /opt/gforge5/ioncube/ioncube_loader_lin_5.1.so,否则在最后添加此句。
保存退出。
重启apache:
# /etc/init.d/httpd restart
在浏览器中访问http://192.168.0.4。看到如界面: