1.安装httpd
yum install apr apr-devel yum install apr-util apr-util-devel yum install pcre pcre-devel ./configure --prefix=/root/programs/httpd2.2 --enable-ssl --enable-cgi --enable-rewrite --enable-zip --with-zlib --with-pcre --with-apr=/usr --enable-mbstring --with-apr-util=/usr --enable-modules=most --enable-mpms-shared=all--with-mpm=event ./apachectl start
2.安装php
#install libxml ./configure --prefix=/root/programs/libxml2 make make install yum install zlib zlib-devel yum install openssl openssl-devel yum install libmcrypt libmcrypt-devel yum install mhash mhash-devel yum install libmcrypt libmcrypt-devel yum install libpqxx libpqxx-devel yum install bzip2-devel yum install libcurl libcurl-devel yum install gd gd-devel yum install bzip2 bzip2-devel ./configure --prefix=/root/programs/php5.6 --with-libxml-dir=/root/programs/libxml2 --with-apxs2=/root/programs/httpd2.2/bin/apxs --with-pdo-pgsql=/usr/pgsql-9.4 --with-pgsql=/usr/pgsql-9.4 --enable-mbstring --enable-zip --with-zlib --enable-xml --enable-sockets --with-mcrypt --with-bz2 --with-openssl --with-gd --with-curl -enable-maintainer-zts --with-config-file-path=/root/programs/php5.6/etc --with-freetype-dir --with-jpeg-dir --with-png-dir make make install ln -s /root/programs/php5.6/bin/php /usr/bin/php cp /root/sources/php-5.6.7/php.ini-production /root/programs/php5.6/etc/php.ini #下载证书 wget https://curl.haxx.se/ca/cacert.pem mv cacert.pem /root/programs/php5.6/cacert.pem vi /root/programs/php5.6/etc/php.ini date.timezone = Asia/Shanghai openssl.cafile=/root/programs/php5.6/cacert.pem
3. 安装PostgreSQL
#添加yum源 sudo rpm -Uvh http://yum.postgresql.org/9.4/redhat/rhel-7-x86_64/pgdg-centos94-9.4-1.noarch.rpm #安装 sudo yum updatesudo yum install postgresql94-server postgresql94-contrib #验证 sudo rpm -aq| grep postgres #初始化数据库 sudo /usr/pgsql-9.4/bin/postgresql94-setup initdb #启动 systemctl enable postgresql-9.4 systemctl start postgresql-9.4 #开放防火墙 firewall-cmd --permanent --add-port=5432/tcpsudo firewall-cmd --permanent --add-port=80/tcpsudo firewall-cmd --reload #访问pgsql su - postgres #设置初始密码 \password postgres #开启远程访问 vi /var/lib/pgsql/9.4/data/postgresql.conf listen_addresses ='*' vi /var/lib/pgsql/9.4/data/pg_hba.conf host all all 0.0.0.0/0 trust #添加owncloud库 sudo -u postgres psql -d postgres CREATE USER owncloud WITH PASSWORD 'password'; CREATE DATABASE owncloud TEMPLATE postgres ENCODING 'UNICODE'; ALTER DATABASE owncloud OWNER TO owncloud; GRANT ALL PRIVILEGES ON DATABASE owncloud TO owncloud;
4.安装owncloud
wget https://download.owncloud.org/community/owncloud-9.0.2.tar.bz2 tar jxvf owncloud-9.0.2.tar.bz2 mv owncloud /root/sites/owncloud chown -R daemon:daemon /root/sites/owncloud #创建数据目录 mkdir /root/data/owncloud/ chown daemon:daemon /root/data/owncloud/ chmod 0770 /root/data/owncloud/
5.配置httpd
vi httpd.conf AddType application/x-httpd-php .php AddType application/x-httpd-php-source .phps DirectoryIndex index.php index.html Include conf/extra/httpd-vhosts.conf listen 8888 vi httpd-vhosts.conf NameVirtualHost *:8888 <Directory "/root/sites/owncloud"> Options FollowSymLinks AllowOverride all Order deny,allow Allow from all </Directory> <VirtualHost *:8888> ServerAdmin webmaster@dummy-host.example.com DocumentRoot "/root/sites/owncloud" ServerName www.louyj.top ServerAlias louyj.top ErrorLog "logs/owncloud-error_log" CustomLog "logs/owncloud-access_log" common </VirtualHost>
6.文件加密设置
#查看加密状态 sudo -u daemon ./occ encryption:status #查看可用加密方案 sudo -u daemon ./occ encryption:list-modules #启用加密 sudo -u daemon ./occ encryption:enable #加密历史数据 sudo -u daemon ./occ maintenance:singleuser sudo -u daemon ./occ encryption:encrypt-all #禁用加密 sudo -u daemon ./occ maintenance:singleuser --on sudo -u daemon ./occ encryption:disable sudo -u daemon ./occ maintenance:singleuser --off
7.App安装
- office支持
下载编译LibreOfficewget https://github.com/LibreOffice/core/archive/libreoffice-5.1.4.1.tar.gz tar zxvf libreoffice-5.1.4.1.tar.gz cd core-libreoffice-5.1.4.1/ yum install libreoffice-core yum install libgcrypt libgcrypt-devel yum install libcap libcap-devel yum install cppunit cppunit-devel 下载编译安装poco-poco-1.7.3-release wget http://download.documentfoundation.org/libreoffice/src/5.1.3/libreoffice-5.1.3.2.tar.xz tar Jxvf libreoffice-5.1.3.2.tar.xz ./configure --enable-silent-rules --enable-debug --with-lokit-path=/root/sources/libreoffice-5.1.3.2/include wget https://github.com/LibreOffice/online/archive/1.6.8-4.tar.gz tar zxvf online-1.6.8-4.tar.gz cd online-1.6.8-4/ cd loolwsd/ libtoolize autoheader aclocal automake --add-missing autoreconf
No Leanote account? Sign up now.