Jump to content

Rumor

Banned
  • Posts

    914
  • Joined

  • Last visited

  • Days Won

    15
  • Feedback

    0%

Posts posted by Rumor

  1. This is a Debian 7 nginx, MariaDB, and PHP-FPM (+phpMyAdmin) installation guide.
     
    Note on MariaDB: This is meant to be a REPLACEMENT of MySQL. It should work where MySQL works.
     
     
    1. Installing and configuring nginx.

    # apt-get install nginx
    # service nginx start
    

    Now if you open your IP address or website address in your browser you should see a "Welcome to nginx!" page. This means you've successfully installed nginx.
     
    Now to configure...

    # nano /etc/nginx/sites-available/default

    Under the Server section set your "server_name" to your FQDN (fully qualified domain name). Don't forget to include "index.php" on the "index" line. It should look somewhat like this when finished:

    server {
    	listen 80 default_server;
    	listen [::]:80 default_server ipv6only=on;
    
    	root /usr/share/nginx/html;
    	index index.php index.html index.htm;
    
    	# Make site accessible from http://localhost/
    	server_name mywebsitedomain.com;
    
    

    Scroll down to the Location section and uncomment the necessary lines. Make modifications as shown:

    location ~ .php$ {
    		try_files $uri =404;
    		fastcgi_split_path_info ^(.+.php)(/.+)$;
    	#	# NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini
    	#
    	#	# With php5-cgi alone:
    	#	fastcgi_pass 127.0.0.1:9000;
    	#	# With php5-fpm:
    		fastcgi_pass unix:/var/run/php5-fpm.sock;
    		fastcgi_index index.php;
    		include fastcgi_params;
    	}
    

    CTRL+X, Y, Enter.
     
    Now you need to edit the nginx.conf file:

    # nano /etc/nginx/nginx.conf 

    Set your "worker_processes" equal to your amount of cores. In this case I'll be using 4. Set your "worker_connections" equal to the input of the following command:

    # ulimit -n
    

    Change "keepalive_timeout 65;" to "keepalive_timeout 15;" then add these lines under the http block:

    client_body_buffer_size 10K;
    client_header_buffer_size 1k;
    client_max_body_size 8m;
    large_client_header_buffers 2 1k;
    client_body_timeout 12;
    client_header_timeout 12;
    send_timeout 10;
    

    CTRL+X, Y, Enter.
     
    You can test your configuration before proceeding, and if there are any mistakes you will be notified what they are and on which line.

    # nginx -t
    

    A correct modification of the configuration should output this data:

    nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
    nginx: configuration file /etc/nginx/nginx.conf test is successful
    

    Restart nginx:

    # service nginx restart
    

    2. Installation of MariaDB.

    # apt-get install python-software-properties
    # apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xcbcb082a1bb943db
    # add-apt-repository 'deb http://mirrors.syringanetworks.net/mariadb/repo/10.1/debian wheezy main'
    # apt-get update
    # apt-get install mariadb-server mariadb-client -y
    

    Set the root user password for mysql when prompted.
     
    This is how you enter the prompt, when finished just type "quit":

    # mysql -v -u root -p
    

    Enter the root sql password you just chose. It will look like this, and you can figure out more things by following the notes:

    Welcome to the MariaDB monitor.  Commands end with ; or g.
    Your MariaDB connection id is 2579
    Server version: 10.1.1-MariaDB-1~wheezy-wsrep-log mariadb.org binary distribution, wsrep_25.10.r4123
    
    Copyright (c) 2000, 2014, Oracle, SkySQL Ab and others.
    
    Reading history-file /root/.mysql_history
    Type 'help;' or 'h' for help. Type 'c' to clear the current input statement.
    
    MariaDB [(none)]>
    
    

    You can check the status of the server like this:

    # service mysql status
    

    Example output of command:

    [info] /usr/bin/mysqladmin  Ver 9.1 Distrib 10.1.1-MariaDB, for debian-linux-gnu on x86_64
    Copyright (c) 2000, 2014, Oracle, SkySQL Ab and others.
    
    Server version          10.1.1-MariaDB-1~wheezy-wsrep-log
    Protocol version        10
    Connection              Localhost via UNIX socket
    UNIX socket             /var/run/mysqld/mysqld.sock
    Uptime:                 11 hours 8 min 3 sec
    
    Threads: 1  Questions: 44634  Slow queries: 0  Opens: 431  Flush tables: 1  Open tables: 113  Queries per second avg: 1.113.
    
    

    3. Installation of PHP-FPM

    # apt-get install php5 php5-fpm php5-mysql
    # nano /etc/php5/fpm/php.ini

    Scroll down to the line "cgi.fixpathinfo=1" and uncomment it. Change the value from 1 to 0. Restart the service:

    # service php5-fpm restart
    

    Create a phpinfo page:

    # nano /usr/share/nginx/html/phpinfo.php
    

    Here are the contents of the file you've created:

    <?php
     phpinfo();
    ?>
    

    CTRL+X, Y, Enter.
     
    Now in your browser, navigate to your IP address or domain followed by the phpinfo.php file. Here's an example:

    http://mywebsitedomain.com/phpinfo.php
    

    4. Installation of phpMyAdmin

    # apt-get install phpmyadmin
    

    Select either option and hit OK. Even though we aren't using apache2 or lighttpd, we can make this work with nginx. Select "<Yes>" when prompted to configure database for phpmyadmin with dbconfig-common. Enter the SQL password you chose earlier as the "administrative user" password. Now enter a password for use with phpMyAdmin.
     
    Now to make it work with nginx we're going to use a symlink:

    # ln -s /usr/share/phpmyadmin/ /usr/share/nginx/html
    # service nginx restart
    

    Navigate in your browser to your IP/domain name and append a "/phpmyadmin" to the end like this:

    http://mywebsitedomain.com/phpmyadmin
    

    You can now login with the username root and password chosen earlier. You can use phpMyAdmin to easily setup databases and user accounts for anything you want to install that requires SQL.

    • Love 3
  2. Thankfully, we have the tutorial for FreeBSD by Shogun here: http://metin2dev.org/board/topic/183-basic-ssh-security/
     
    Today's example should work on Unbuntu and some other OS as well. This example is based off Debian 7 Wheezy. It's almost an identical process.
     
    1. Add the new user account and restrict sudo usage. Be root user before continuing!

    # adduser roman

    This will prompt the user for input, you can leave it all default. Type in a password when prompted.

    # nano /etc/pam.d/su

    Go down and uncomment the following line:

    #auth       required pam_wheel.so

    CTRL+X, Y, Enter.
     
    2. Permit the new user account to use the wheel group with root privileges:

    # groupadd wheel
    # usermod -G wheel roman

    3. Create your private key and configure WinSCP to use it.

    # cd /home
    # chown -R roman:wheel roman/
    # su roman
    # ssh-keygen

    Accept all defaults with enter.

    # cd roman/.ssh
    # mv id_rsa.pub authorized_keys
    # cat id_rsa

    Copy the entire output (including the comments) by highlighting it in PuTTy then paste it into a text file and save it. Download this program: https://www.puttygen.com/

     

    Run puttygen and click "Load" then select "All Files" from the file dialog and select the text file you saved the key to. Click "Save Private Key" and select "Yes" on the popup regarding password.

     

    Now open WinSCP and add a new connection with the same IP address but with the new user name (in our example, "roman"). Click "Advanced" then click "Authentication". Click the three dots ("...") and select the ppk file you saved using puttygen. Click "OK" then save your connection.

     

    4. Disable root login and password authentication.

    # su root

    Enter the root password when prompted.

    # nano /etc/ssh/sshd_config

    Go down to the line called "PermitRootLogin" and change it's value to "no".

    Go down to the line called "PasswordAuthentication" and change it's value to "no". Uncomment this line.

    CTRL+X, Y, Enter.

     

    Now restart the ssh service and you're done.

    # service ssh restart

    If you're unsure about what you're doing, I recommend leaving an extra root terminal open in PuTTy so if something goes wrong you can reverse your changes.

    • Metin2 Dev 1
    • Good 1
    • Love 1
  3. make another folder for your new server.. for example..

     

    /home/server1 <- current server files

    /home/server2 <- new server files

     

    make a copy of your db and rename the databases with a 2 on the end or some other unique identifier to indicate it's for the new server. you can still put these copies in the /var/db/mysql directory.

     

    In the config files for the new server, be sure to link the database names correctly, appending the identifier for your new server to match the database names.

     

    Assuming your start script is relative to the directory the server files are in, you don't have to modify it; otherwise you need to adjust this as well as the other scripts to deal with the new files.

    • Love 1
  4.  

     

    If I Stay wasn't that bad, but it wasn't awesome either.

     

    I've been wanting to see this since I saw the trailers when I was on vacation. I have downloaded a few copies but I'm waiting for a quality copy :P

     

    Chloe<3

     

    There is a 1080p BluRay copy xD

     

     

    I couldn't find one back then. I downloaded one yesterday in 1080p and watched it. It wasn't too interesting honestly :/ but she's cute. lol.

  5.  

    When I used MySQL 56 with Metin2 my server never saved the data.

    After reboot always accounts was the same without modifications before start.

     

    More safe is install with ports

    portsnap fetch extract
    
    cd /usr/ports/databases/mysql56-server
    make install WITH_XCHARSET=all clean
    

     

    which is from my tut

    • Good 1
  6. what is the point of this topic?

     

    are you a kid Rumor?

     

    you insulted the guy in the conversation, that tells us who you are!

     

    I'm 25, but as I've said I lost patience for his attitude.. People like this in general just really annoy me. They can barely type and they argue the most ridiculous points over and over despite showing them they're wrong. It's just too much to take sometimes when people won't accept the truth.

  7.  

    Most servers from here (Romania) are owned by kids

    Just like anywhere else, my dear.

     

    And people who script like '<div class="cusngireun"><?PHP echo $array['name']; ?></div>' are just terrible or lazy scripter.

    Using this all the time.

     

    Smarty it is no longer the prefered template engine. Twig (http://twig.sensiolabs.org/) it's prefered by the most.

    Twig is good. However, even Symfony (which is the number one framework to use Twig) offers PHP "templating".

     

    BTW, props to the OP for showering in only eight minutes.

    Seems like getting an account on that server got you quite excited.

     

    Hennink's script was pretty fine back when it was written. It is "designed" like many not-so-optimal scripts, and there were quite some critical flaws, which eventually got patched individually over time.

    It was also back then (and still, to some extent, is today) when php-mysql was simply the most common MySQL API in PHP with the highest likelyness to be available on almost any PHP installation and hosting provider.

     

    The PHP landscape changed a lot in recent years and frameworks as well as object orientation are omnipresent now.

     

     

    Yeah I'm not a chick I do what needs to be done and have no reason to waste time or spend hours in the shower. Don't be jelly cuz im efficient lol.

  8. In my opinion, you lost all reason when you insulted first, so the point you tried to prove, just became meaningless due to that.

     

    [5:19:17 PM] Roman: are you braindead or what

    [5:19:38 PM] Roman: what a dumbass

    [5:19:53 PM] Roman: ignorant piece of shit

     

    I see your point, however I lost all patience with this kid after waiting for him for 4 days and having him insult my intelligence every time I told him it doesn't work.

  9. iptocountry table seems to be working right now. I'm not sure, how it got repaired, but I'm happy that now I have been able to re-create it.

     

    Item_proto and other tables are still empty though...

    Here is screen:

     

    hWKqE.png

     

    Maybe your game core isn't using the txt-based proto files?

    INTERNAL_IP: 192.168.1.105 interface em0
    Can not get public ip address
    INTERNAL_IP: 192.168.1.105 interface em0
    Can not get public ip address
    INTERNAL_IP: 192.168.1.105 interface em0
    Can not get public ip address
    INTERNAL_IP: 192.168.1.105 interface em0
    Can not get public ip address
    INTERNAL_IP: 192.168.1.105 interface em0
    Can not get public ip address
    INTERNAL_IP: 192.168.1.105 interface em0
    Can not get public ip address
    INTERNAL_IP: 192.168.1.105 interface em0
    Can not get public ip address
    INTERNAL_IP: 192.168.1.105 interface em0
    Can not get public ip address
    INTERNAL_IP: 192.168.1.105 interface em0
    Can not get public ip address
    INTERNAL_IP: 192.168.1.105 interface em0
    Can not get public ip address
    INTERNAL_IP: 192.168.1.105 interface em0
    Can not get public ip address
    INTERNAL_IP: 192.168.1.105 interface em0
    Can not get public ip address
    INTERNAL_IP: 192.168.1.105 interface em0
    Can not get public ip address
    INTERNAL_IP: 192.168.1.105 interface em0
    Can not get public ip address
    INTERNAL_IP: 192.168.1.105 interface em0
    Can not get public ip address
    INTERNAL_IP: 192.168.1.105 interface em0
    Can not get public ip address
    INTERNAL_IP: 192.168.1.105 interface em0
    Can not get public ip address
    
    

    now this is what i got in autorun.log

     

    and client doesn't work

     

    btw how to open the sql database with navicat ??

     

    Best Regrades

          FlyGun

     

     

    in CONFIG add this line:

    PUBLIC_IP: x.x.x.x
    

    Only belongs in channels and auth. The x's represent the public IP on your server.

  10. nobody expected you to have that long folder directory but FYI you can use tab to autocomplete things in putty.

     

    type "ps" and make sure processes are running because the protos should populate with the data from the txt files in the server files.

     

    Also about being unable to delete the table, post the exact error please.

    • Love 1
  11. exactly, says 6 but even with 8 it doesn't work..lol Just because some people can do it doesn't mean it works. For it to be considered working everyone should be able to register. The error is on the website end because it has nothing to do with the page not loading correctly. It's spitting out an error about the registration each time.

×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.