ドキュメントスキャナーを使うことで
複合機のスキャナーを使う事ができた
機種
EW-M660FT
ローカルネット(Wifi)にて接続
ドキュメントスキャナーを使うことで
複合機のスキャナーを使う事ができた
機種
EW-M660FT
ローカルネット(Wifi)にて接続
Ubuntu 20のノートPCで、PHPのデバック環境を構築のために、ApachとPHPをインストールして、Web用のPHPの動作確認ができる環境を作ってみた
1 2 3 4 5 6 7 8 9 |
sudo apt install apache2 sudo apache2ctl configtest AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message Syntax OK http://127.0.1.1/ |
静的な、HTMLのサンプルプログラムを作ってみる
sudo vim /var/www/html/test.html vimが入っていなかった vim sudo apt install vim sudo vim /var/www/html/test.html 挿入 i <html> <hr> hello <hr> </html> esc :wq 保存終了 http://127.0.1.1/test.html
では、PHPをインストールしてみる
PHPと libapache2-mod-phpをインストール sudo apt install php libapache2-mod-php php -v PHP 7.4.3 (cli) (built: Oct 25 2021 18:20:54) ( NTS ) Copyright (c) The PHP Group Zend Engine v3.4.0, Copyright (c) Zend Technologies with Zend OPcache v7.4.3, Copyright (c), by Zend Technologies バージョンは7.4.3 サンプルプログラムを作ってみる sudo vim /var/www/html/info.php 挿入 i <?php phpinfo(); ?> esc :wq 保存終了 ブラウザーから実行してみる http://127.0.1.1/info.php
無事起動できた
apacheの状態がどうか確認、起動、停止は
apacheの状態がどうか確認するのは sudo systemctl status apache2 apacheを停止するのは sudo systemctl stop apache2 apacheを起動するのは sudo systemctl start apache2 内容確認 $ sudo systemctl status apache2 ● apache2.service - The Apache HTTP Server Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor pres&gt; Active: active (running) since Sun 2021-12-12 10:31:30 JST; 1min 46s ago Docs: https://httpd.apache.org/docs/2.4/ Process: 12169 ExecStart=/usr/sbin/apachectl start (code=exited, status=0/&gt; Main PID: 12174 (apache2) Tasks: 6 (limit: 6973) Memory: 9.6M CGroup: /system.slice/apache2.service ├─12174 /usr/sbin/apache2 -k start ├─12175 /usr/sbin/apache2 -k start ├─12176 /usr/sbin/apache2 -k start ├─12177 /usr/sbin/apache2 -k start ├─12178 /usr/sbin/apache2 -k start └─12179 /usr/sbin/apache2 -k start 12月 12 10:31:30 Lenovo systemd[1]: Starting The Apache HTTP Server… 12月 12 10:31:30 Lenovo apachectl[12172]: AH00558: apache2: Could not reliably&gt; 12月 12 10:31:30 Lenovo systemd[1]: Started The Apache HTTP Server. 画面が、表示状態なのでqで終了する apache2を終了 $ sudo systemctl stop apache2 内容確認 $ sudo systemctl status apache2 ● apache2.service - The Apache HTTP Server Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor pres&gt; Active: inactive (dead) since Sun 2021-12-12 10:34:56 JST; 4s ago Docs: https://httpd.apache.org/docs/2.4/ Process: 12169 ExecStart=/usr/sbin/apachectl start (code=exited, status=0/&gt; Process: 12413 ExecStop=/usr/sbin/apachectl stop (code=exited, status=0/SU&gt; Main PID: 12174 (code=exited, status=0/SUCCESS) 12月 12 10:31:30 Lenovo systemd[1]: Starting The Apache HTTP Server… 12月 12 10:31:30 Lenovo apachectl[12172]: AH00558: apache2: Could not reliably&gt; 12月 12 10:31:30 Lenovo systemd[1]: Started The Apache HTTP Server. 12月 12 10:34:56 Lenovo systemd[1]: Stopping The Apache HTTP Server… 12月 12 10:34:56 Lenovo apachectl[12415]: AH00558: apache2: Could not reliably&gt; 12月 12 10:34:56 Lenovo systemd[1]: apache2.service: Succeeded. 12月 12 10:34:56 Lenovo systemd[1]: Stopped The Apache HTTP Server. もう一度、起動してみる $ sudo systemctl start apache2 内容確認 $ sudo systemctl status apache2 ● apache2.service - The Apache HTTP Server Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor pres&gt; Active: active (running) since Sun 2021-12-12 10:35:28 JST; 4s ago Docs: https://httpd.apache.org/docs/2.4/ Process: 12437 ExecStart=/usr/sbin/apachectl start (code=exited, status=0/&gt; Main PID: 12441 (apache2) Tasks: 6 (limit: 6973) Memory: 10.1M CGroup: /system.slice/apache2.service ├─12441 /usr/sbin/apache2 -k start ├─12442 /usr/sbin/apache2 -k start ├─12443 /usr/sbin/apache2 -k start ├─12444 /usr/sbin/apache2 -k start ├─12445 /usr/sbin/apache2 -k start └─12446 /usr/sbin/apache2 -k start 12月 12 10:35:28 Lenovo systemd[1]: Starting The Apache HTTP Server… 12月 12 10:35:28 Lenovo apachectl[12440]: AH00558: apache2: Could not reliably&gt; 12月 12 10:35:28 Lenovo systemd[1]: Started The Apache HTTP Server.
その他
/var/www/html/ にファイルを設置すると、Apacheに組み込むことができる UbuntuのノートPCで、開発を行う場合 /var/www/html/ での操作にはroot権限が必要となるので sudo nautilus で、nautilusを起動してから テキストエディタ(gedit)を起動することで、 ファイルの作成ができる
参考ページ
ttps://www.yokoweb.net/2020/08/14/ubuntu-20_04-apache-php/
ttps://ubuntu.perlzemi.com/blog/20200519084454.html
ローカルPCで、PHPをコマンドラインでテストする時
PDO接続で
could not find driver
が、表示された
ドライバーが入っていないとのことなので
sudo apt-get install -y php-mysqlnd
にて、追加する
root権限でファイルを操作する時は
root権限でnautilusを立ち上げる
sudo nautilus
paypalを使って、メールやメッセンジャーなどで請求するリンク(決済リンク)の作り方をまとめてみた
ログインしたら、「お支払い・決済の受け取り」をクリックし
PayPalボタンを押下
「今すぐ購入」を押下
以前に作成したものを使う時には
「保存したボタンに移動」を、押下
作成済の一覧になるので、一覧を選択し、「内訳画面」へ
新規に作成する場合には
1.商品名
2.金額
を入力して「3.ボタンを作成」を、押下
内訳の画面になるので、「メールアドレス」のタブを
選択すると、リンクURLを取得することができます
これを、メールに貼り付けて、購入希望者に送付したり
申し込みフォームの自動返信メッセージに追加することで、決済を自動で促すことができる
マウスが上手く効かなくなくなりUbuntuを終了したい時には
[Ctrl]+[Alt]+[T]により、端末を開き
shutdown -h now
にて、強制終了ができる
Windowsのファイルやフォルダーのショートカットアイコンを作成してみる
ショートカットを保存するフォルダーと、ショートカット作成元のファイル、フォルダーを表示する
ファイルマネージャーで開く(2つのウインドウ)
ファイルマネージャは
Gnome
Nautilus
のどちらでもOK
CTR+Shiftを押して
ショートカット作成元のファイル、フォルダーをクリックして
ショートカットを保存するフォルダーへ
ドラッグしドロップすると
シュートカットが作成できる
liberty office impressで、気に入った外字を使うために
フォントを追加してみた
手順は、必要なフォント(.ttf)を入手し
/usr/local/share/fonts
に格納すればいいようである
1,フォントファイルを入手(.ttf)
Googleで 外字 フリーフォント
で、探す
https://nextist.net/free-font-brush/
紹介サイトなど
https://fontdasu.com/shippori-mincho/
とりあえず、これを入手
使用するにあたり、ライセンス、利用範囲などは確認するように
Shippori_Mincho_B1.zip
をダウンロード
解凍する (xxxx)は、各自に合わせて
cd /home/xxxx/ダウンロード ls Shippori_Mincho_B1.zip
ダウンロードファイルを確認
Shipporiへ解凍して
unzip Shippori_Mincho_B1.zip -d ./Shippori
解凍された内容を確認
ls Shippori ShipporiMinchoB1-Bold.ttf ShipporiMinchoB1-Medium.ttf ShipporiMinchoB1-SemiBold.ttf ShipporiMinchoB1-ExtraBold.ttf ShipporiMinchoB1-Regular.ttf
2,フォントを/usr/local/share/fontsに格納
ls /usr/local/share/fonts
現在は空のよう
転送してみる
cp Shippori/*.ttf /usr/local/share/fonts cp: 通常ファイル '/usr/local/share/fonts/ShipporiMinchoB1-Bold.ttf' を作成できません: 許可がありません cp: 通常ファイル '/usr/local/share/fonts/ShipporiMinchoB1-ExtraBold.ttf' を作成できません: 許可がありません cp: 通常ファイル '/usr/local/share/fonts/ShipporiMinchoB1-Medium.ttf' を作成できません: 許可がありません cp: 通常ファイル '/usr/local/share/fonts/ShipporiMinchoB1-Regular.ttf' を作成できません: 許可がありません cp: 通常ファイル '/usr/local/share/fonts/ShipporiMinchoB1-SemiBold.ttf' を作成できません: 許可がありません
権限がない
sudo cp Shippori/*.ttf /usr/local/share/fonts ls /usr/local/share/fonts ShipporiMinchoB1-Bold.ttf ShipporiMinchoB1-Medium.ttf ShipporiMinchoB1-SemiBold.ttf ShipporiMinchoB1-ExtraBold.ttf ShipporiMinchoB1-Regular.ttf
無事、転送された
3,動作確認
liberty office impressで使ってみる
無事追加されている
転送したfontの権限は、そのままでいいようである
一度、電源オフして立ち上げ治すと、反映される
外字フォントとしては
藍原筆文字楷書
https://faraway.work/font.html
などもある(教育漢字(1006文字)なので、表示されない漢字もある、支援版はだと常用漢字約250文字が追加)
すでに、ライセンスを所有している状態で
Ubuntu 20 に pycharmをインストールしてみた
JetBrains のページから
https://www.jetbrains.com/pycharm/
ダウンロードを選択
既にライセンスがあるのでプロのダウンロードを選択
pycharm-professional-2021.2.1.tar.gz
が、ダウンロードされる
cd cd ダウンロード ls pycharm-pro* pycharm-professional-2021.2.1.tar.gz
pycharm-professional-2021.2.1.tar.gz
を、確認
tar -zxvf pycharm-professional-2021.2.1.tar.gz
フォルダーをホームへ移動
(xxx)は、各環境に合わせてください
mv pycharm-2021.2.1 /home/xxx cd /home/xxx/pycharm-2021.2.1/bin ./pycharm.sh
インストールできたようである
プロジェクトを作って作業にはいれる
シュートカットのアイコンも作っておく
cd ~/.local/share/applications
touch jetbrains-pycharm.desktop
vi jetbrains-pycharm.desktop
以下をi 後に貼り付ける(shift+Ctr+v)
書き込み終了
ESC :wq [enter]
/home/xxxx/
は、各自に合わせ
[Desktop Entry] Version=1.0 Type=Application Name=PyCharm Icon=/home/ubuntu/pycharm-2021.2.1/bin/pycharm.png Exec="/home/ubuntu/pycharm-2021.2.1/bin/pycharm.sh" %f Comment=Develop with pleasure! Categories=Development;IDE; Terminal=false StartupWMClass=jetbrains-pycharm
Ubuntu 20 に atomをインストールするには
2つの方法がある
apt-get による方法
sudo add-apt-repository ppa:webupd8team/atom sudo apt-get update sudo apt-get install atom
snapを使う方法
sudo snap install --classic atom
不要になった時のアンインストールの安定性などから
後者のsnapで行ったみた
sudo snap install --classic atom [sudo] ubuntu のパスワード: atom 1.57.0 from Snapcrafters installed
バージョンは1.57.0
のようである