Linux環境に不慣れな私が簡単に試したかったので残しておく。
PHPが入ってることは前提。
バージョンなど、必要条件は公式でご確認のほどを。
wgetとunzipが無い場合は手に入れる
# yum -y install wget
# yum -y install unzip
フォルダ移動
# cd /usr/local/lib
Smartyをダウンロード
# wget https://github.com/smarty-php/smarty/archive/master.zip
解凍する
# unzip master.zip
ドキュメントルートに、下記PHPを配置
test.php
<?php
require_once('/usr/local/lib/smarty-master/libs/Smarty.class.php');
$smarty = new Smarty();
?>
アクセス
http://ルートURL/test.php にアクセスしてエラーが出なければOK!終わり
私の開発環境です。 実際に運用したい場合はいろんな設定が必要だと思います。参考
https://www.smarty.net/docsv2/ja/installing.smarty.basic.tpl