* DB 로 접속합니다.

#   mysql -uroot -proot
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1885 to server version: 5.0.26

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql>



* databases 확인

mysql> show databases ;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| db_zb4             |
| db_zb5             |
| mysql              |
| test               |
+--------------------+
5 rows in set (0.07 sec)

mysql>



* 제로보드5 설치 database 접속

mysql> use db_zb5 ;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed

mysql>



* 테이블 확인

mysql> show tables ;
+--------------------------+
| Tables_in_db_bbs2        |
+--------------------------+
| zb_analytics             |
| zb_articles              |
| zb_comment               |
| zb_file                  |
| zb_layout_manager        |
| zb_member_level          |
| zb_member_level_manager  |
| zb_member_list           |
| zb_member_mail           |
| zb_member_signup_manager |
| zb_menu_manager          |
| zb_menu_tree             |
| zb_message               |
| zb_module_category       |
| zb_module_manager        |
| zb_page_category         |
| zb_page_manager          |
| zb_page_plugin           |
| zb_plugin_category       |
| zb_plugin_manager        |
| zb_referer_query         |
| zb_report_log            |
| zb_search_keyword        |
| zb_sequence              |
| zb_serial                |
| zb_server_manager        |
| zb_session               |
| zb_session_autologin     |
| zb_site_manager          |
| zb_site_message          |
| zb_survey                |
| zb_survey_item           |
| zb_survey_log            |
| zb_tag                   |
| zb_trackback             |
+--------------------------+
35 rows in set (0.00 sec)

mysql>



*  패스워드를 갖고 있는 zb_member_list 테이블 구조 확인 (Describe)

mysql> desc zb_member_list ;
+-----------------+--------------+------+-----+---------+-------+
| Field           | Type         | Null | Key | Default | Extra |
+-----------------+--------------+------+-----+---------+-------+
| member_srl      | int(11)      | NO   | PRI |         |       |
| listorder       | int(11)      | NO   | MUL |         |       |
| user_id         | varchar(20)  | NO   | UNI |         |       |
| passwd          | varchar(60)  | NO   |     |         |       |
| user_name       | varchar(20)  | NO   |     |         |       |
| nick_name       | varchar(20)  | NO   | UNI |         |       |
| email_address   | varchar(255) | NO   | UNI |         |       |
| email           | varchar(255) | NO   |     |         |       |
| email_host      | varchar(255) | NO   | MUL |         |       |
| extend_val      | text         | YES  |     | NULL    |       |
| new_message     | int(11)      | NO   |     |         |       |
| point           | int(11)      | NO   |     |         |       |
| allowed         | varchar(2)   | NO   |     | N       |       |
| denied          | varchar(2)   | NO   |     | N       |       |
| mailing         | varchar(2)   | NO   | MUL | N       |       |
| manager_message | text         | NO   |     |         |       |
| regdate         | varchar(14)  | NO   | MUL |         |       |
| last_signin     | varchar(14)  | NO   |     |         |       |
| image_nick      | varchar(255) | NO   |     |         |       |
| image_mark      | varchar(255) | NO   |     |         |       |
| profile_image   | varchar(255) | NO   |     |         |       |
| sign            | text         | NO   |     |         |       |
+-----------------+--------------+------+-----+---------+-------+
22 rows in set (0.02 sec)

mysql>



* admin 계정 관련 기본 정보 확인 (select)

mysql> select user_id, passwd, user_name from zb_member_list ;
+---------+----------------------------------+-----------+
| user_id | passwd                           | user_name |
+---------+----------------------------------+-----------+
| admin   | 890sdfsdfd78fsdfsd89sdf1234mmcaq | admin     |
+---------+----------------------------------+-----------+
1 row in set (0.00 sec)



* admin 계정 패스워드 변경 (초기화) 하기

mysql> update zb_member_list set passwd='21232f297a57a5a743894a0e4a801fc3' where user_id='admin' ;

Query OK, 1 row affected (0.01 sec)
Rows matched: 1  Changed: 1  Warnings: 0


위와 같이 패스워드 값을 변경 (초기화) 하면 admin / admin 으로 로그인 할수 있습니다.


(참고로 패스워드 값을 '81dc9bdb52d04dc20036dbd8313ed055' 로 update 하면  admin 패스워드를 1234 로 변경할 수 있습니다.......)




마지막으로 웹 관리자 페이지로 접속하여 패스워드 변경후 사용하시면 됩니다....... 



http://www.wowunix.com/cgi-bin/CrazyWWWBoard.cgi?mode=read&num=22&db=zeroboard&backdepth=1

Posted by Narusika
,

간혹 고객들 중에 “도메인 뒤에 계정이 있는 디렉토리로 연결되게 해주세요” 라는 요청이 있으면 처음 듣는 사람은 엄청 당혹 스럽습니다.

아래의 내용은 이러한 설정 방법에 대한 내용 입니다.

http://IP또는도메인/~계정 // 이렇게 접속하면 /home/계정/ 디렉토리로 접속이 된다.



[root@localhost /]# vi /usr/local/apache/conf/httpd.conf 에서

아래의 내용 주석 삭제

Include conf/extra/httpd-userdir.conf

UserDir /home/


[root@localhost /]# vi /usr/local/apache/conf/extra/httpd-userdir.conf

# Settings for user home directories
#
# Required module: mod_userdir

#
# UserDir: The name of the directory that is appended onto a user’s home
# directory if a ~user request is received.  Note that you must also set
# the default access control for these directories, as in the example below.
#
UserDir /public_html/ 을 아래와 같이 수정

UserDir /home/ // 이 설정은 본인의 home/ 즉 웹소스가 있는 경로로 지정을 해준다.

#
# Control access to UserDir directories.  The following is an example
# for a site where these directories are restricted to read-only.
#
<Directory “/home/*”> // 변경
    AllowOverride FileInfo AuthConfig Limit Indexes
    Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
    <Limit GET POST OPTIONS>
        Order allow,deny
        Allow from all
    </Limit>
    <LimitExcept GET POST OPTIONS>
        Order deny,allow
        Deny from all
    </LimitExcept>
</Directory>


[root@localhost /]# /etc/init.d/apachectl restart // 아파치 재시작


http://접속도메인/~들어갈 디렉토리 명/


ex)

[root@localhost youmust]# cd /home/youmust/

[root@localhost youmust]# ll

total 8260
drwxr-xr-x  10 root    root    20480 Jun 18 15:28 ./
drwxr-xr-x.  5 root    root     4096 Apr  7 15:17 ../
-rw-r–r–   1 root    root    17563 Jan 27 20:09 1
drwxr-xr-x   2 youmust users    4096 Mar 12  2014 HomeWork/
drwxr-xr-x   5 youmust users    4096 Jan 23  2014 Maildir/
-rw-r–r–   1 youmust users 1094886 Mar  4  2014 TFT????????????_????????????.pdf
-rw-r–r–   1 youmust users   21356 Nov  7  2014 Windows2008_???????????????_????????????.odt
-rw-r–r–   1 youmust users   34092 May  7  2014 apm_setup_script1.sh
drwxr-xr-x   2 youmust users    4096 May  9  2014 eaccelerator/
drwxr-xr-x  14 root    root     4096 Apr  7 14:50 gnu/
drwx—rwx   4 root    root     4096 Dec 16  2013 mrtg/
-rw-r–r–   1 root    root     3048 Jul  4  2014 mrtg-l.png
-rw-r–r–   1 root    root     3048 Jul  4  2014 mrtg-m.png
-rw-r–r–   1 root    root     3048 Jul  4  2014 mrtg-r.png
drwxr-xr-x   5 root    root     4096 Apr  7 15:20 wordpress/
-rw-r–r–   1 root    root  7159143 Feb 19 08:42 wordpress-4.1.1-ko_KR.zip
drwx—rwx  20 root    root     4096 Jun  4 13:22 xe/
drwxr-xr-x   2 root    root    20480 Dec 27  2013 youmust/
-rw-r–r–   1 youmust users   27986 Mar 11  2014 ??????????????? ??????(0316??????).ods
-rw-r–r–   1 youmust users    1073 Mar 16  2014 ???????????? ??? apm config ??????.txt

http://dbjara.com/~youmust/  —> 로 접속 하면 아래와 같이 내용이 나온다.

선택 영역_001

선택 영역_002

]

출처 :http://idchowto.com/?p=13798

'리눅스' 카테고리의 다른 글

swap 메모리  (0) 2015.07.14
dmidecode 하드웨어 확인 명령어  (0) 2015.07.14
make 명령어 옵션  (0) 2015.06.28
awstats 설치  (0) 2015.06.24
VI 문자열 치환  (0) 2015.06.22
Posted by Narusika
,

php 에러는 /var/log/message에 나타난다.


에러가 없다면 php는 정상적으로 설치된것.


phpinfo.php 파일이 정상적으로 보이지 않고 다운로드가 된다면 


아파치 httpd.conf에 AddType을 확인해 보고, php.ini 에서 short open tag = on 으로 해놓았다면


phpinfo파일에 <? phpinfo(); ?> 까지만 적어주자 <?php phpinfo(); ?> 로 하면 페이지 다운이 된다.

'리눅스 > php' 카테고리의 다른 글

php 에러  (0) 2016.03.10
php-common 설치 오류  (0) 2016.02.17
php imap 설치  (0) 2015.07.20
phpinfo.php  (0) 2015.06.28
Posted by Narusika
,

configure 후  make&make install 시 오류 발생

 

mysql.cc: In function 'void print_table_data(MYSQL_RES*)':

mysql.cc:1650: error: expected primary-expression before '?' token

mysql.cc:1650: error: expected ':' before ')' token

mysql.cc:1650: error: expected primary-expression before ')' token

mysql.cc:1652: error: expected primary-expression before '?' token

mysql.cc:1652: error: expected ':' before ')' token

mysql.cc:1652: error: expected primary-expression before ')' token

mysql.cc:1666: error: expected primary-expression before '?' token

mysql.cc:1666: error: expected ':' before ')' token

mysql.cc:1666: error: expected primary-expression before ')' token

make[1]: *** [mysql.o] Error 1

make[1]: Leaving directory `/usr/local/src/APM_Setup/mysql-4.0.27/client'

make: *** [install-recursive] Error 1

 

이런식으로 뜨면 gcc버전 문제로 설치가 안 된다고 함.

 보통의 경우 gcc 및 g++ 버전이 높아 설치시 에러가 뜨는 것인데

 대처 방법은 우선 호환성 라이브러리 패키지를 설치해주고



[해결방법]

# yum install compat-*

 

gcc와 g++의 이름변경으로 백업후 gcc34, g++34 심볼릭 링크로 gcc,gcc++를 생성해주면된다

# cd /usr/bin

# mv gcc gcc-backup

# mv g++ g++-backup

# ln -s gcc34 gcc

# ln -s g++34 g++

 

설치 후에는 make & make install로 설치 진행




참고 sosnote.com

'리눅스 > mysql' 카테고리의 다른 글

mysql 4.0 설치시 에러  (0) 2015.07.28
mysql 제로보드 패스워드 초기화  (0) 2015.07.09
mysql 실행 시 -bash: mysql: command not found  (0) 2015.06.22
mysql 실행 에러  (0) 2015.06.08
mysql 실행 오류  (0) 2015.05.30
Posted by Narusika
,

phpinfo.php

리눅스/php 2015. 6. 28. 14:32

버전을 낮추거나 높였을때 

phpinfo.php를 웹페이지에서 확인하면 버전 변경이 안되어있는 경우가 있다.



libphp5.so   그때는 이파일을 apache 모듈 폴더에서 확인하자.


'리눅스 > php' 카테고리의 다른 글

php 에러  (0) 2016.03.10
php-common 설치 오류  (0) 2016.02.17
php imap 설치  (0) 2015.07.20
phpinfo.php 다운로드 될때  (0) 2015.06.30
Posted by Narusika
,

make 명령어 옵션

리눅스 2015. 6. 28. 09:34


ex) make -j 8        -8 이라하면 코어 8개로 한번에 돌린다는 뜻.


보통 그냥 돌리면 코어 하나로 돌아감


'리눅스' 카테고리의 다른 글

dmidecode 하드웨어 확인 명령어  (0) 2015.07.14
도메인을 이용해 사용자 디렉토리 접속 방법  (0) 2015.07.01
awstats 설치  (0) 2015.06.24
VI 문자열 치환  (0) 2015.06.22
fstab , mtab 이 삭제된 경우  (0) 2015.06.22
Posted by Narusika
,

awstats 설치

리눅스 2015. 6. 24. 20:57


버전 

centos 6.6

awstats 6.5


cd /usr/local/

wget http://firewolf.co.kr/download/linux/PUB/awstats-6.5.tar.gz

tar xvfpz awstats-6.5.tar.gz

mv awstats-6.5 awstats

chown -R root:root awstats

chmod 755 awstats

mkdir /etc/awstats

mkdir /var/lib/awstats


cd /usr/local/awstats/tools

perl ./awstats_configure.pl

y

firewolf.co.kr  (자신이 사용할 도메인을 넣는다.)

/etc/awstats

엔터

엔터


cd /etc/awstats/

vi ./awstats.firewolf.co.kr.conf

LogFile="/var/log/httpd/mylog.log" ==> LogFile="/usr/local/apache/logs/access_log"



cat /usr/local/awstats/tools/httpd_conf  요항목들을

vi /usr/local/apache/conf/httpd.conf 삽입 (설치하면 기본적으로 삽입되어있습니다.)

# Directives to add to your Apache conf file to allow use of AWStats as a CGI.

# Note that path "/usr/local/awstats/" must reflect your AWStats install path.

#

Alias /awstatsclasses "/usr/local/awstats/wwwroot/classes/"

Alias /awstatscss "/usr/local/awstats/wwwroot/css/"

Alias /awstatsicons "/usr/local/awstats/wwwroot/icon/"

ScriptAlias /awstats/ "/usr/local/awstats/wwwroot/cgi-bin/"


# This is to permit URL access to scripts/files in AWStats directory.

#

    Options None

    AllowOverride None

    Order allow,deny

    Allow from all





vi /usr/local/apache/conf/httpd.conf에서 로그 형식 바꿈


CustomLog /usr/local/apache/logs/access_log 보통 이렇게 되어있는것을


SetEnvIfNoCase Request_URI (gif|png|jpg|css|js|bmp|jpeg|swf)$ IMAGE=1

CustomLog /usr/local/apache/logs/access_log combined env=!img-nosave,!CodeRedNimda


/usr/local/apache/bin/apachectl restart (아피치 리스타트)




실행 /usr/local/awstats/wwwroot/cgi-bin/awstats.pl -update -config=firewolf.co.kr



실행시 오류 날때


[root@localhost awstats]# /usr/local/awstats/wwwroot/cgi-bin/awstats.pl -update -config=115.68.74.148

Update for config "/etc/awstats/awstats.115.68.74.148.conf"

With data in log file "/usr/local/apache/logs/access_log"...

Phase 1 : First bypass old records, searching new record...

Searching new records from beginning of log file...

AWStats did not find any valid log lines that match your LogFormat parameter, in the 50th first non commented lines read                          of your log.

Your log file /usr/local/apache/logs/access_log must have a bad format or LogFormat parameter setup does not match this f                         ormat.

Your AWStats LogFormat parameter is:

1

This means each line in your web server log file need to have "combined log format" like this:

111.22.33.44 - - [10/Jan/2001:02:14:14 +0200] "GET / HTTP/1.1" 200 1234 "http://www.fromserver.com/from.htm" "Mozilla/4.0                          (compatible; MSIE 5.01; Windows NT 5.0)"

And this is an example of records AWStats found in your log file (the record number 50 in your log):

66.249.75.113 - - [28/May/2015:12:02:58 +0900] "GET /store/shop/index.php?page=view_class&class_id=5606 HTTP/1.1" 404 218

Setup ('/etc/awstats/awstats.115.68.74.148.conf' file, web server or permissions) may be wrong.

Check config file, permissions and AWStats documentation (in 'docs' directory).


로그 타입때문에 생기는 오류


#vi /etc/awstats/awstats.youmust.conf

LogFormat=”%host %other %logname %time1 %methodurl %code %bytesd”






[root@localhost awstats]# /usr/local/awstats/wwwroot/cgi-bin/awstats.pl -update -config=115.68.74.148

Update for config "/etc/awstats/awstats.115.68.74.148.conf"

With data in log file "/usr/local/apache/logs/access_log"...

Phase 1 : First bypass old records, searching new record...

Direct access after last parsed record (after line 28)

Jumped lines in file: 28

 Found 28 already parsed records.

Parsed lines in file: 34

 Found 0 dropped records,

 Found 0 corrupted records,

 Found 0 old records,

 Found 34 new qualified records.


위같은 메시지가 나오면 성공!




crontab -e 

10 * * * * /usr/local/awstats/wwwroot/cgi-bin/awstats.pl -update -config=115.68.74.148





확인 http://자기 도메인/awstats/awstats.pl?config=자기 도메인




-----------------------------------------------------------------------------------------------------------------------


yum install awstats


cd /etc/awstats

cp awstats.localhost.localdomain.conf  ./awstats.naruman.com.conf


vi awstats.naruman.com.conf


LogFile="/logs/access.log"               // 아파치 로그

SiteDomain="naruman.com"            // 도메인 이름

DirData="/var/www/awstats"           // 데이터 디렉토리


기본에서 위 3개만 수정



vi /etc/httpd/conf.d/awstats.conf


allow from 127.0.0.1 을   -->  allow from all   변경




스크립트 작성


vi /root/script/awstatsupdate.sh


#!/bin/bash

exec /usr/bin/awstats_updateall.pl now -confdir="/etc" -awstatsprog="/var/www/awstats/awstats.pl" >/dev/null 

exit 0




vi /etc/crontab 등록


#awstats

*/5     *       *       *       *       root    /root/script/awstatsupdate.sh




naruman.com/awstats/awstats.pl


접속




 


출처 : https://www.linux.co.kr/home/lecture/?leccode=10641

'리눅스' 카테고리의 다른 글

도메인을 이용해 사용자 디렉토리 접속 방법  (0) 2015.07.01
make 명령어 옵션  (0) 2015.06.28
VI 문자열 치환  (0) 2015.06.22
fstab , mtab 이 삭제된 경우  (0) 2015.06.22
mrtg 설치하기  (0) 2015.06.20
Posted by Narusika
,

VI 문자열 치환

리눅스 2015. 6. 22. 16:56

vi 문자열 치환하기


vi상에서 문자열을 일괄적으로 치환할 때, 명령줄에 다음을 입력한다.


:시작범위,끝범위 s/원래문자열/바꿀문자열/g


ex1) 처음부터 끝까지 lex를 yacc로 바꾸려면

:1,$ s/lex/yacc/g

※범위를 전체(처음부터 끝까지)로 잡을 경우, 1,$ 대신 %를 써도 무관하다.


ex2) 22번째 줄부터 40번째 줄 사이에서 절망을 희망으로 바꾸려면

:22,40 s/절망/희망/g


출처 : http://soharang.tistory.com/849

'리눅스' 카테고리의 다른 글

make 명령어 옵션  (0) 2015.06.28
awstats 설치  (0) 2015.06.24
fstab , mtab 이 삭제된 경우  (0) 2015.06.22
mrtg 설치하기  (0) 2015.06.20
apache 데몬 chkconfig 등록 안될때  (0) 2015.06.05
Posted by Narusika
,

mysql 실행 시 -bash: mysql: command not found


# vi /etc/profile  맨 마지막 줄에


export PATH="$PATH:/usr/local/mysql/bin"  


source /etc/profile   바로적용

'리눅스 > mysql' 카테고리의 다른 글

mysql 제로보드 패스워드 초기화  (0) 2015.07.09
mysql make시에 에러 발생 error: expected primary-expression before '?' token  (0) 2015.06.29
mysql 실행 에러  (0) 2015.06.08
mysql 실행 오류  (0) 2015.05.30
mysql ip 설정  (0) 2015.05.16
Posted by Narusika
,
fstab 을 수정 하다가 꼬이거나 삭제가 된경우 read only 파일 시스템이 되거나 부팅이 되다 멈추거나 하는 증상이 있습니다.
이미 read only 상태기 때문에 수정이 안되지만, 방법은 있습니다.
 
그럼 아래와 같이 최상위 폴더를 마운트 한 후 수정 합니다.
[root@falinux ~]$ mount -o remount rw /
[root@falinux ~]$ cp .fstab /etc/fstab  
 
fstab 파일은 최상위 폴더에 .fstab 이라는 파일로 가지고 있으며, 이를 복사 해 주면 됩니다.
 
 
mtab 은 조금 다릅니다.
mtab 은 사실 링크파일 입니다.
 
ll -al 명령으로 확인 해보면 아래와 같이 나오는 것을 볼 수 있습니다.
 
lrwxrwxrwx    1 root     root           12 Sep 30 10:44 mtab -> /proc/mounts 
 
즉, mtab 은 /proc/mounts 입니다.
 
read only 파일 시스템으로 변경되는 이유는 대부분 이 mtab 이 삭제 되어서 입니다.
사실 이 심볼릭링크 파일이 삭제되는 이유는 잘 모르겠지만, 복구는 위 fstab 과 비슷 합니다.
 
[root@falinux ~]$ mount -o remount rw /
[root@falinux etc]$ ln -s /proc/mounts mtab
[root@falinux etc]$ cat mtab 
rootfs / rootfs rw 0 0
/dev/root / yaffs2 rw,relatime 0 0
/proc /proc proc rw,relatime 0 0
/sys /sys sysfs rw,relatime 0 0
none /dev/pts devpts rw,relatime,gid=5,mode=620 0 0
usbfs /proc/bus/usb usbfs rw,relatime 0 0
[root@falinux etc]$  
 
위 같이 리마운트 해서 /proc/mounts 를 mtab 으로 링크 걸어주면 됩니다.
 
리부팅 해보면 정상적으로 될 것 입니다.


 출처 : http://forum.falinux.com/zbxe/index.php?document_srl=797150&mid=lecture_tip

'리눅스' 카테고리의 다른 글

awstats 설치  (0) 2015.06.24
VI 문자열 치환  (0) 2015.06.22
mrtg 설치하기  (0) 2015.06.20
apache 데몬 chkconfig 등록 안될때  (0) 2015.06.05
아파치 접속자 수 확인  (0) 2015.06.03
Posted by Narusika
,