Linux

open source social network install

Naan 2016. 3. 11. 12:20
반응형

centos 6.5 에서 설치


-mysql 설치

# yum install mysql*

# service mysql start

# chkconfig mysql on


- mysql 설정

# mysql -u root -p

CREATE DATABASE ossn;

CREATE USER 'ossnuser'@'localhost' IDENTIFIED BY 'PASSWORD';

GRANT ALL PRIVILEGES ON `ossn`.* TO 'ossnuser'@'localhost';

FLUSH PRIVILEGES;


- httpd 설치

# yum install httpd*

# service httpd start

# chkconfig httpd on


- ossn 다운 및 설치

https://www.opensource-socialnetwork.org/download

위 경로에서 다운 받아서 압축 풀고

# unzip Ossn-v4.0-1453676400.zip

# mv ossn/ /var/www/html/

# chown -R apache:apache /var/www/html/ossn/

# chcon -R -t httpd_user_content_t /var//www/html/


- php 설치


php 5.3 이하 버전은 설치가 안된다. 버전 5.4 이상으로 설치하자


repo 추가

# vi /etc/yum.repos.d/remi.repo

[remi]

name=Les RPM de remi pour Enterprise Linux 6 - $basearch

#baseurl=http://rpms.famillecollet.com/enterprise/6/remi/$basearch/

mirrorlist=http://rpms.famillecollet.com/enterprise/6/remi/mirror

enabled=1

gpgcheck=0

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi

 

# yum install php php-gd php-xml php-common php-mysql



- 방화벽 설정

# vi /etc/sysconfig/iptables

-A INPUT -p udp -m state --state NEW --dport 80 -j ACCEPT

-A INPUT -p tcp -m state --state NEW --dport 80 -j ACCEPT

추가


http://localhost/ossn 접속을 하자


접속을 했는데 


위와 같이 화면이 뜬다면

# vi /etc/httpd/conf/httpd.conf

DirectoryIndex index.html index.html.var index.php

맨 뒤에 index.php 추가해주자





위와 같이 나오면 next


내용 입력





정보 입력



이러면 모든 작업이 끝난다.



-- error 



MOD_REWRITE REQUIRED 에러가 나온다면


# vi /var/www/html/.htaccess

RewriteEngine on


# vi /etc/httpd/conf/httpd.conf


#

    Options Indexes FollowSymLinks


#

# AllowOverride controls what directives may be placed in .htaccess files.

# It can be "All", "None", or any combination of the keywords:

#   Options FileInfo AuthConfig Limit

#

    AllowOverride none -> All


#

# Controls who can get stuff from this server.

#


# service httpd restart


아파치 로그에 

A session had already been started - ignoring session_start()

에러가 뜬다면

# vi /var/www/html/ossn/system/start.php


session_start();

if(!isset($_SESSION)){
    session_start();
}
로 변경



반응형