burada eth0 dan sonraki ip statik (sabit) olacak adress netmask ise c class maskeleme gibi hangi network maskesini kullanacağınızı gireceksiniz genelde c class tır yani 255.255.255.0 dır
sonra ifconfig ile bakarak ip adresini statik ayarladıkmı kontrol ediyoruz
sudo route add default gw 192.168.0.253 eth0
bu komutlada internet için yanı internet çıkışı için proxy mi modem mi ne ile internete çıkmak istiyorsanız onun gateway yani varsayılan ağ geçidinizin ip sini tanımlıyorsunuz.
iki komutu aynı anda girmek için ise ; ile peş peşe iki komut çalışır
total 12
drwxr-xr-x 2 root root 4096 Jan 801:29.
drwxr-xr-x 3 root root 4096 Jan 801:28..-rw-r--r--1 root root 177 Jan 801:29 index.html
test apache
http://localhost/ veya http://192.168.1.100 veya http://hostname
hostname öğrenmek : hostname komutu
ip öğrenmek için ise hostname -I komutunu kullanabilir siniz
Indexing browsing özelliğini kapatmak (güvenlik almak)
To get your WordPress site set up, you need a database. Run the mysql command in the terminal and provide your login credentials (e.g. username root, password password):
mysql -uroot -ppassword
Here I have provided my password (the word password) on the command line; there is no space between -p and your password.
Alternatively you can simply supply an empty -p flag and wait to be asked for a password:
mysql -uroot -p
Now you will be prompted to enter the root user password you created earlier.
Once you’re connected to MySQL, you can create the database your WordPress installation will use:
mysql> create database wordpress;
Note the semi-colon ending the statement. On success you should see the following message:
Query OK, 1 row affected (0.00 sec)
Exit out of the MySQL prompt with Ctrl + D.
You need to find out your Pi’s IP address to access it in the browser, so in a terminal type the command hostname -I.
Navigate to http://YOUR-IP-ADDRESS e.g. http://192.168.1.5 in the web browser on your Pi.
You should see a WordPress error page; this is good! Click the big button marked Create a Configuration File followed by the Let's go! button on the next page.
Now fill out the basic site information as follows:
Upon successful database connection, you will be given the contents of your wp-config.php file:
Copy this text, return to the terminal on the Pi and edit the file with nano wp-config.php. Paste the text into this file, and save and exit with Ctrl + X, then Y for yes and Enter.
Now hit the Run the install button.
WELCOME SCREEN
Now you’re getting close.
Fill out the information: give your site a title, create a username and password, put in your email address and untick the search engines box. Hit the Install WordPress button, then log in using the account you just created.
Now you’re logged in and have your site set up, you can see the website by visiting your IP address in the browser on the Pi or another computer on the network. To log in again (or on another computer), go to http://YOUR-IP-ADDRESS/wp-admin.
FRIENDLY PERMALINKS
It’s recommended that you change your permalink settings to make your URLs more friendly. To do this, log in to WordPress and go to the dashboard. Go to Settings then Permalinks. Select thePost name option and click Save Changes. After saving, you will be prompted to update your.htaccess file. You probably don’t have one yet, so add one in /var/www/html/ by typing nano .htaccess; note this is a hidden file, so it starts with a dot. Then paste in the contents provided:
Save the file and return to the website homepage. Click on the post title or the sample page link and you’ll probably see a Not Found error page. This is because the rewrite module has not been enabled in Apache. To do this, enter sudo a2enmod rewrite.
You’ll also need to tell the virtual host serving the site to allow requests to be overwritten. Do this by editing the virtual host file (with root permissions): sudo nano /etc/apache2/sites-available/default; also, change the AllowOverride setting on line 11 (inside the <Directory /var/www/html/> block) from None to All. Save the file and then restart Apache with sudo service apache2 restart. Once it’s restarted, refresh the page and it should load successfully. Now posts have URLs like /hello-world/ instead of /?p=123, and pages have URLs like/sample-page/ instead of /?page_id=2.
CUSTOMISATION
WordPress is very customisable. By clicking your site name in the WordPress banner along the top of the page (when logged in), you’ll be taken to the Dashboard. From here you can change the theme, add pages and posts, edit the menu, add plugins and lots more. This is just a taster for getting something interesting set up on the Raspberry Pi’s web server.
Bilgisayar Mühendisi ve Ekonomist
1982 yılında İstanbul Fatih'te doğdum. Bilişim teknolojileri alanında AR-GE çalışmaları yapıyor, özel bir şirkette SAP SE ERP sistemleri üzerine proje yöneticisi olarak görev alıyorum.
Teknolojiye olan ilgim, uçak teknolojileri ve özellikle jet motorlarına yönelmiş durumda. Aynı zamanda SoloTürk hayranıyım ve iyi bir drone pilotuyum. Fenerbahçe Spor Kulübü üyesiyim ve teknoloji merakımı, özellikle bu alandaki deneyimlerimi paylaşmayı amaçlıyorum. Teknolojik ürünler ve yeniliklerle ilgili bilgileri paylaşarak, bu alandaki tutkumuzu geniş bir kitleye ulaştırmayı hedefliyorum.
Felsefi olarak bilginin doğru yönetilmesi gerektiğine inanıyor ve metafiziğe olan ilgimi de ilim ve bilimle harmanlıyorum. Elektrikle çalışan her şey hakkında düşünmeyi ve beyin fırtınası yapmayı sevenlerle bilgi paylaşımı yapmaktan keyif alıyorum.
Daha fazla bilgi için blog.karadere.com adresinden takip edebilirsiniz.
Çağrı Kodu: TA1HKB
Kod Adı: Burhan_07
Nickname: Swish_+
Oca 17 2016
RasperryPi Kurulum ve configuration notlarım
Temel linux komutları : http://www.karadere.com/blog/linux-komutlari-linux-sistemlerdeki-command-prompt-shell-line-komutlari.html
Change ip address eth0 or wlan0 interface Ubuntu veya Raspberry Pi – command prompt shell den ip değiştirmek
Changing Your IP From the Command Line in Linux
bu komut ile ip adresini interface bazlı öğreniyoruz
mevcut ip adresini aşağıdaki komutları girerek değiştirebilirsiniz.
burada eth0 dan sonraki ip statik (sabit) olacak adress netmask ise c class maskeleme gibi hangi network maskesini kullanacağınızı gireceksiniz genelde c class tır yani 255.255.255.0 dır
sonra ifconfig ile bakarak ip adresini statik ayarladıkmı kontrol ediyoruz
bu komutlada internet için yanı internet çıkışı için proxy mi modem mi ne ile internete çıkmak istiyorsanız onun gateway yani varsayılan ağ geçidinizin ip sini tanımlıyorsunuz.
iki komutu aynı anda girmek için ise ; ile peş peşe iki komut çalışır
daha fazla kaynak için https://help.ubuntu.com/community/CommandlineHowto
daha sonra route tablosuna bakalım
route -n
DNS ayarlarını ayarlamak
nameserver 8.8.8.8
nameserver 208.67.220.220
gibi ayarlıyoruz
web server kurulumu apache ve PHP ve MY SQL
apache kurulumu
Indexing browsing özelliğini kapatmak (güvenlik almak)
bul ve aşağıdaki gibi değiştir.
sonra apache servisini yeniden başlat
sudo chmod 777 {dosya adresi} -R
“/var/www/” klasörüne vererek deneyelim.
sudo chmod 777 /var/www/html -R
To get your WordPress site set up, you need a database. Run the
mysql
command in the terminal and provide your login credentials (e.g. usernameroot
, passwordpassword
):Here I have provided my password (the word
password
) on the command line; there is no space between-p
and your password.Alternatively you can simply supply an empty
-p
flag and wait to be asked for a password:Now you will be prompted to enter the root user password you created earlier.
Once you’re connected to MySQL, you can create the database your WordPress installation will use:
Note the semi-colon ending the statement. On success you should see the following message:
Exit out of the MySQL prompt with
Ctrl + D
.You need to find out your Pi’s IP address to access it in the browser, so in a terminal type the command
hostname -I
.Navigate to
http://YOUR-IP-ADDRESS
e.g.http://192.168.1.5
in the web browser on your Pi.You should see a WordPress error page; this is good! Click the big button marked
Create a Configuration File
followed by theLet's go!
button on the next page.Now fill out the basic site information as follows:
Upon successful database connection, you will be given the contents of your
wp-config.php
file:Copy this text, return to the terminal on the Pi and edit the file with
nano wp-config.php
. Paste the text into this file, and save and exit withCtrl + X
, thenY
for yes andEnter
.Now hit the
Run the install
button.WELCOME SCREEN
Now you’re getting close.
Fill out the information: give your site a title, create a username and password, put in your email address and untick the search engines box. Hit the
Install WordPress
button, then log in using the account you just created.Now you’re logged in and have your site set up, you can see the website by visiting your IP address in the browser on the Pi or another computer on the network. To log in again (or on another computer), go to
http://YOUR-IP-ADDRESS/wp-admin
.FRIENDLY PERMALINKS
It’s recommended that you change your permalink settings to make your URLs more friendly. To do this, log in to WordPress and go to the dashboard. Go to
Settings
thenPermalinks
. Select thePost name
option and clickSave Changes
. After saving, you will be prompted to update your.htaccess
file. You probably don’t have one yet, so add one in/var/www/html/
by typingnano .htaccess
; note this is a hidden file, so it starts with a dot. Then paste in the contents provided:Save the file and return to the website homepage. Click on the post title or the sample page link and you’ll probably see a
Not Found
error page. This is because therewrite
module has not been enabled in Apache. To do this, entersudo a2enmod rewrite
.You’ll also need to tell the virtual host serving the site to allow requests to be overwritten. Do this by editing the virtual host file (with root permissions):
sudo nano /etc/apache2/sites-available/default
; also, change theAllowOverride
setting on line 11 (inside the<Directory /var/www/html/>
block) fromNone
toAll
. Save the file and then restart Apache withsudo service apache2 restart
. Once it’s restarted, refresh the page and it should load successfully. Now posts have URLs like/hello-world/
instead of/?p=123
, and pages have URLs like/sample-page/
instead of/?page_id=2
.CUSTOMISATION
WordPress is very customisable. By clicking your site name in the WordPress banner along the top of the page (when logged in), you’ll be taken to the Dashboard. From here you can change the theme, add pages and posts, edit the menu, add plugins and lots more. This is just a taster for getting something interesting set up on the Raspberry Pi’s web server.
By Burhan KARADERE • Programlama - Software • 0 • Tags: configuration, kurulumu, RasperryPi